Skip to content

Commit 0798b2b

Browse files
format: run cargo fmt
Signed-off-by: Soc Virnyl Estela <contact@uncomfyhalomacro.pl>
1 parent e1de78e commit 0798b2b

2 files changed

Lines changed: 19 additions & 18 deletions

File tree

cargo/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,5 +11,5 @@ pub mod cargo_commands;
1111
pub mod cli;
1212
pub mod consts;
1313
pub mod registry;
14-
pub mod vendor;
1514
pub(crate) mod toml_manifest;
15+
pub mod vendor;

cargo/src/toml_manifest.rs

Lines changed: 18 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
use glob::glob;
2+
use serde::Deserialize;
3+
use serde::Serialize;
24
use std::collections::BTreeMap;
35
use std::fs;
46
use std::io;
57
use std::path::Path;
68
use std::path::PathBuf;
7-
use serde::Deserialize;
8-
use serde::Serialize;
99

1010
#[allow(unused_imports)]
1111
use tracing::{Level, debug, error, info, trace, warn};
@@ -120,23 +120,24 @@ pub fn workspace_has_dependencies(workdir: &Path, src: &Path) -> io::Result<bool
120120
return Err(io::Error::new(io::ErrorKind::NotFound, msg));
121121
}
122122
} else if member_path_from_glob.is_file()
123-
&& let Some(filename) = member_path_from_glob.file_name() {
124-
let filename = filename.to_string_lossy();
125-
if filename == *"Cargo.toml" {
126-
info!(?member_path_from_glob, "🐈 Found a membered path.");
127-
let is_workspace = is_workspace(&member_path_from_glob)?;
128-
if is_workspace {
129-
global_has_deps = global_has_deps
130-
|| workspace_has_dependencies(
131-
workdir,
132-
&member_path_from_glob,
133-
)?;
134-
} else {
135-
global_has_deps = global_has_deps
136-
|| has_dependencies(&member_path_from_glob)?;
137-
}
123+
&& let Some(filename) = member_path_from_glob.file_name()
124+
{
125+
let filename = filename.to_string_lossy();
126+
if filename == *"Cargo.toml" {
127+
info!(?member_path_from_glob, "🐈 Found a membered path.");
128+
let is_workspace = is_workspace(&member_path_from_glob)?;
129+
if is_workspace {
130+
global_has_deps = global_has_deps
131+
|| workspace_has_dependencies(
132+
workdir,
133+
&member_path_from_glob,
134+
)?;
135+
} else {
136+
global_has_deps = global_has_deps
137+
|| has_dependencies(&member_path_from_glob)?;
138138
}
139139
}
140+
}
140141
}
141142
} else {
142143
warn!("⚠️ Workspace has membered itself at the root of the project.");

0 commit comments

Comments
 (0)