Skip to content

Commit e0d9d5f

Browse files
committed
quality: fmt
1 parent 7054a90 commit e0d9d5f

File tree

3 files changed

+14
-13
lines changed

3 files changed

+14
-13
lines changed

crates/spfs/src/graph/mod.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,9 @@ mod tree;
2020
use std::cell::RefCell;
2121

2222
pub use annotation::{
23-
Annotation, AnnotationValue, DEFAULT_SPFS_ANNOTATION_LAYER_MAX_STRING_VALUE_SIZE,
23+
Annotation,
24+
AnnotationValue,
25+
DEFAULT_SPFS_ANNOTATION_LAYER_MAX_STRING_VALUE_SIZE,
2426
};
2527
pub use blob::Blob;
2628
pub use database::{

crates/spfs/src/runtime/storage.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@ use super::startup_ps;
2626
use super::{config_nu, env_nu};
2727
#[cfg(unix)]
2828
use super::{startup_csh, startup_sh};
29-
use super::{config_nu, env_nu};
3029
use crate::encoding::Digest;
3130
use crate::env::SPFS_DIR_PREFIX;
3231
use crate::graph::object::Enum;

crates/spk-cli/group1/src/cmd_completion.rs

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,13 @@
44

55
//! Generate shell completions for "spk"
66
7+
use std::fmt;
78
use std::io::Write;
89

9-
use clap::{Command, Parser, value_parser};
10+
use clap::{value_parser, Command, Parser, ValueEnum};
1011
use clap_complete;
1112
use clap_complete::{Generator, Shell};
1213
use clap_complete_nushell::Nushell;
13-
use clap::ValueEnum;
1414
use miette::Result;
1515
use spk_cli_common::CommandArgs;
1616

@@ -25,17 +25,17 @@ enum ShellCompletion {
2525
/// Nushell
2626
Nushell,
2727
}
28-
impl ToString for ShellCompletion {
29-
fn to_string(&self) -> String {
30-
match self {
31-
ShellCompletion::Bash => "bash".to_string(),
32-
ShellCompletion::Fish => "fish".to_string(),
33-
ShellCompletion::Zsh => "zsh".to_string(),
34-
ShellCompletion::Nushell => "nu".to_string(),
35-
}
28+
impl fmt::Display for ShellCompletion {
29+
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
30+
let s = match self {
31+
ShellCompletion::Bash => "bash",
32+
ShellCompletion::Fish => "fish",
33+
ShellCompletion::Zsh => "zsh",
34+
ShellCompletion::Nushell => "nu",
35+
};
36+
write!(f, "{}", s)
3637
}
3738
}
38-
3939
impl Generator for ShellCompletion {
4040
/// Generate the file name for the completion script.
4141
fn file_name(&self, name: &str) -> String {

0 commit comments

Comments
 (0)