diff options
| author | Ellie Huxtable <ellie@atuin.sh> | 2025-03-19 12:44:20 +0000 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-03-19 12:44:20 +0000 |
| commit | 14ec768b4520d4fc34dbf24e663ea7db940c18b7 (patch) | |
| tree | a37db707ab8676cad5b3e6ca47af3f2997958906 /crates/atuin-dotfiles/src/shell | |
| parent | feat: Use readline binding for ctrl-a when it is not the prefix (#2626) (diff) | |
| download | atuin-14ec768b4520d4fc34dbf24e663ea7db940c18b7.zip | |
chore: migrate to rust 2024 (#2635)
* chore: upgrade to 2024 edition
* ugh unsafe
* format
* nixxxxxxxxxxx why
Diffstat (limited to '')
| -rw-r--r-- | crates/atuin-dotfiles/src/shell.rs | 9 | ||||
| -rw-r--r-- | crates/atuin-dotfiles/src/shell/bash.rs | 2 | ||||
| -rw-r--r-- | crates/atuin-dotfiles/src/shell/fish.rs | 2 | ||||
| -rw-r--r-- | crates/atuin-dotfiles/src/shell/xonsh.rs | 2 | ||||
| -rw-r--r-- | crates/atuin-dotfiles/src/shell/zsh.rs | 2 |
5 files changed, 10 insertions, 7 deletions
diff --git a/crates/atuin-dotfiles/src/shell.rs b/crates/atuin-dotfiles/src/shell.rs index 3e139819..d7762b3c 100644 --- a/crates/atuin-dotfiles/src/shell.rs +++ b/crates/atuin-dotfiles/src/shell.rs @@ -1,4 +1,4 @@ -use eyre::{ensure, eyre, Result}; +use eyre::{Result, ensure, eyre}; use rmp::{decode, encode}; use serde::Serialize; @@ -158,7 +158,7 @@ pub async fn import_aliases(store: &AliasStore) -> Result<Vec<Alias>> { #[cfg(test)] mod tests { - use crate::shell::{parse_alias, Alias}; + use crate::shell::{Alias, parse_alias}; #[test] fn test_parse_simple_alias() { @@ -177,7 +177,10 @@ mod tests { let git_alias = super::parse_alias("gwip='git add -A; git rm $(git ls-files --deleted) 2> /dev/null; git commit --no-verify --no-gpg-sign --message \"--wip-- [skip ci]\"'").expect("failed to parse alias"); assert_eq!(git_alias.name, "gwip"); - assert_eq!(git_alias.value, "'git add -A; git rm $(git ls-files --deleted) 2> /dev/null; git commit --no-verify --no-gpg-sign --message \"--wip-- [skip ci]\"'"); + assert_eq!( + git_alias.value, + "'git add -A; git rm $(git ls-files --deleted) 2> /dev/null; git commit --no-verify --no-gpg-sign --message \"--wip-- [skip ci]\"'" + ); } #[test] diff --git a/crates/atuin-dotfiles/src/shell/bash.rs b/crates/atuin-dotfiles/src/shell/bash.rs index b4c87336..05f2cbe1 100644 --- a/crates/atuin-dotfiles/src/shell/bash.rs +++ b/crates/atuin-dotfiles/src/shell/bash.rs @@ -1,6 +1,6 @@ use std::path::PathBuf; -use crate::store::{var::VarStore, AliasStore}; +use crate::store::{AliasStore, var::VarStore}; async fn cached_aliases(path: PathBuf, store: &AliasStore) -> String { match tokio::fs::read_to_string(path).await { diff --git a/crates/atuin-dotfiles/src/shell/fish.rs b/crates/atuin-dotfiles/src/shell/fish.rs index fc1aeee5..72d95dd7 100644 --- a/crates/atuin-dotfiles/src/shell/fish.rs +++ b/crates/atuin-dotfiles/src/shell/fish.rs @@ -1,7 +1,7 @@ // Configuration for fish use std::path::PathBuf; -use crate::store::{var::VarStore, AliasStore}; +use crate::store::{AliasStore, var::VarStore}; async fn cached_aliases(path: PathBuf, store: &AliasStore) -> String { match tokio::fs::read_to_string(path).await { diff --git a/crates/atuin-dotfiles/src/shell/xonsh.rs b/crates/atuin-dotfiles/src/shell/xonsh.rs index a416ccb2..b87e3585 100644 --- a/crates/atuin-dotfiles/src/shell/xonsh.rs +++ b/crates/atuin-dotfiles/src/shell/xonsh.rs @@ -1,6 +1,6 @@ use std::path::PathBuf; -use crate::store::{var::VarStore, AliasStore}; +use crate::store::{AliasStore, var::VarStore}; async fn cached_aliases(path: PathBuf, store: &AliasStore) -> String { match tokio::fs::read_to_string(path).await { diff --git a/crates/atuin-dotfiles/src/shell/zsh.rs b/crates/atuin-dotfiles/src/shell/zsh.rs index efb83897..161fd9a7 100644 --- a/crates/atuin-dotfiles/src/shell/zsh.rs +++ b/crates/atuin-dotfiles/src/shell/zsh.rs @@ -1,6 +1,6 @@ use std::path::PathBuf; -use crate::store::{var::VarStore, AliasStore}; +use crate::store::{AliasStore, var::VarStore}; async fn cached_aliases(path: PathBuf, store: &AliasStore) -> String { match tokio::fs::read_to_string(path).await { |
