Skip to content

Commit

Permalink
quality: run cargo fmt
Browse files Browse the repository at this point in the history
  • Loading branch information
doubleailes committed Sep 9, 2024
1 parent 9fa89ef commit e66c0cc
Show file tree
Hide file tree
Showing 5 changed files with 31 additions and 15 deletions.
10 changes: 8 additions & 2 deletions crates/spfs/src/graph/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,17 @@ mod tree;
use std::cell::RefCell;

pub use annotation::{
Annotation, AnnotationValue, DEFAULT_SPFS_ANNOTATION_LAYER_MAX_STRING_VALUE_SIZE,
Annotation,
AnnotationValue,
DEFAULT_SPFS_ANNOTATION_LAYER_MAX_STRING_VALUE_SIZE,
};
pub use blob::Blob;
pub use database::{
Database, DatabaseIterator, DatabaseView, DatabaseWalker, DigestSearchCriteria,
Database,
DatabaseIterator,
DatabaseView,
DatabaseWalker,
DigestSearchCriteria,
};
pub use entry::Entry;
pub use kind::{HasKind, Kind, ObjectKind};
Expand Down
10 changes: 4 additions & 6 deletions crates/spfs/src/runtime/config_nu.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,15 @@
// https://github.com/spkenv/spk
// Warning Nushell version >=0.97


pub fn source<T>(_tmpdir: Option<&T>) -> String
where
T: AsRef<str>,
{
r#"
{
r#"
$env.config = {
show_banner: false,
}
$env.SPFS_SHELL_MESSAGE? | print
"#
.to_string()
}

.to_string()
}
7 changes: 3 additions & 4 deletions crates/spfs/src/runtime/env_nu.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
pub fn source<T>(_tmpdir: Option<&T>) -> String
where
T: AsRef<str>,
{
r#"
{
r#"
def create_left_prompt [] {
let dir = match (do --ignore-shell-errors { $env.PWD | path relative-to $nu.home-path }) {
null => $env.PWD
Expand Down Expand Up @@ -75,5 +75,4 @@ where
$env.NU_VENDOR_AUTOLOAD_DIR = ($spfs_startup_dir)
"#
.to_string()
}

}
17 changes: 15 additions & 2 deletions crates/spfs/src/runtime/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,21 @@ pub mod winfsp;
#[cfg(unix)]
pub use overlayfs::is_removed_entry;
pub use storage::{
makedirs_with_perms, Author, BindMount, Config, Data, KeyValuePair, KeyValuePairBuf, LiveLayer,
LiveLayerFile, MountBackend, OwnedRuntime, Runtime, Status, Storage, STARTUP_FILES_LOCATION,
makedirs_with_perms,
Author,
BindMount,
Config,
Data,
KeyValuePair,
KeyValuePairBuf,
LiveLayer,
LiveLayerFile,
MountBackend,
OwnedRuntime,
Runtime,
Status,
Storage,
STARTUP_FILES_LOCATION,
};
#[cfg(windows)]
pub use winfsp::is_removed_entry;
2 changes: 1 addition & 1 deletion crates/spfs/src/runtime/storage.rs
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,9 @@ use tokio::io::AsyncReadExt;

#[cfg(windows)]
use super::startup_ps;
use super::{config_nu, env_nu};
#[cfg(unix)]
use super::{startup_csh, startup_sh};
use super::{config_nu, env_nu};
use crate::encoding::Digest;
use crate::env::SPFS_DIR_PREFIX;
use crate::graph::object::Enum;
Expand Down

0 comments on commit e66c0cc

Please sign in to comment.