Skip to content

Commit c63b8c0

Browse files
committed
Minor style fixes
1 parent 7c8ee49 commit c63b8c0

File tree

2 files changed

+16
-37
lines changed

2 files changed

+16
-37
lines changed

src/cargo/core/compiler/fingerprint/dirty_reason.rs

Lines changed: 15 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
use super::*;
2-
use crate::core::Shell;
3-
41
use std::fmt;
52
use std::fmt::Debug;
63

4+
use super::*;
5+
use crate::core::Shell;
6+
77
#[derive(Clone, Debug)]
88
pub enum DirtyReason {
99
RustcChanged,
@@ -135,9 +135,7 @@ impl DirtyReason {
135135
match self {
136136
DirtyReason::RustcChanged => s.dirty_because(unit, "the toolchain changed"),
137137
DirtyReason::FeaturesChanged { .. } => {
138-
s.dirty_because(unit, "the list of features changed")?;
139-
140-
Ok(())
138+
s.dirty_because(unit, "the list of features changed")
141139
}
142140
DirtyReason::TargetConfigurationChanged => {
143141
s.dirty_because(unit, "the target configuration changed")
@@ -148,11 +146,7 @@ impl DirtyReason {
148146
DirtyReason::ProfileConfigurationChanged => {
149147
s.dirty_because(unit, "the profile configuration changed")
150148
}
151-
DirtyReason::RustflagsChanged { .. } => {
152-
s.dirty_because(unit, "the rustflags changed")?;
153-
154-
Ok(())
155-
}
149+
DirtyReason::RustflagsChanged { .. } => s.dirty_because(unit, "the rustflags changed"),
156150
DirtyReason::MetadataChanged => s.dirty_because(unit, "the metadata changed"),
157151
DirtyReason::ConfigSettingsChanged => {
158152
s.dirty_because(unit, "the config settings changed")
@@ -169,37 +163,25 @@ impl DirtyReason {
169163
Ok(())
170164
}
171165
DirtyReason::PrecalculatedComponentsChanged { .. } => {
172-
s.dirty_because(unit, "the precalculated components changed")?;
173-
174-
Ok(())
166+
s.dirty_because(unit, "the precalculated components changed")
175167
}
176168
DirtyReason::DepInfoOutputChanged { .. } => {
177169
s.dirty_because(unit, "the dependency info output changed")
178170
}
179171
DirtyReason::RerunIfChangedOutputFileChanged { .. } => {
180-
s.dirty_because(unit, "rerun-if-changed output file path changed")?;
181-
182-
Ok(())
172+
s.dirty_because(unit, "rerun-if-changed output file path changed")
183173
}
184174
DirtyReason::RerunIfChangedOutputPathsChanged { .. } => {
185-
s.dirty_because(unit, "the rerun-if-changed instructions changed")?;
186-
187-
Ok(())
175+
s.dirty_because(unit, "the rerun-if-changed instructions changed")
188176
}
189177
DirtyReason::EnvVarsChanged { .. } => {
190-
s.dirty_because(unit, "the environment variables changed")?;
191-
192-
Ok(())
178+
s.dirty_because(unit, "the environment variables changed")
193179
}
194180
DirtyReason::EnvVarChanged { name, .. } => {
195-
s.dirty_because(unit, format_args!("the env variable {name} changed"))?;
196-
197-
Ok(())
181+
s.dirty_because(unit, format_args!("the env variable {name} changed"))
198182
}
199183
DirtyReason::LocalFingerprintTypeChanged { .. } => {
200-
s.dirty_because(unit, "the local fingerprint type changed")?;
201-
202-
Ok(())
184+
s.dirty_because(unit, "the local fingerprint type changed")
203185
}
204186
DirtyReason::NumberOfDependenciesChanged { old, new } => s.dirty_because(
205187
unit,
@@ -235,13 +217,10 @@ impl DirtyReason {
235217
format_args!("the file `{}` has changed ({after})", file.display()),
236218
)
237219
}
238-
StaleItem::ChangedEnv { var, .. } => {
239-
s.dirty_because(
240-
unit,
241-
format_args!("the environment variable {var} changed"),
242-
)?;
243-
Ok(())
244-
}
220+
StaleItem::ChangedEnv { var, .. } => s.dirty_because(
221+
unit,
222+
format_args!("the environment variable {var} changed"),
223+
),
245224
},
246225
FsStatus::StaleDependency {
247226
name,

src/cargo/core/compiler/job.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
use crate::core::compiler::fingerprint::DirtyReason;
21
use std::fmt;
32
use std::mem;
43

54
use super::job_queue::JobState;
5+
use crate::core::compiler::fingerprint::DirtyReason;
66
use crate::util::CargoResult;
77

88
pub struct Job {

0 commit comments

Comments
 (0)