Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ exit = "warn"
tests_outside_test_module = "warn"
assertions_on_result_states = "warn"
error_impl_error = "warn"
or_fun_call = "warn"

[profile.dev]
panic = "abort"
Expand Down
2 changes: 1 addition & 1 deletion src/clippy-tracing/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -260,7 +260,7 @@ impl Error for ExecError {}
fn exec() -> Result<Option<(PathBuf, usize, usize)>, ExecError> {
let args = CommandLineArgs::parse();

let path = args.path.unwrap_or(PathBuf::from("."));
let path = args.path.unwrap_or_else(|| PathBuf::from("."));
for entry_res in WalkDir::new(path).follow_links(true) {
let entry = entry_res.map_err(ExecError::Entry)?;
let entry_path = entry.into_path();
Expand Down
2 changes: 1 addition & 1 deletion src/cpu-template-helper/src/template/verify/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ where
for (key, template_value_filter) in template {
let config_value_filter = config
.get(&key)
.ok_or(VerifyError::KeyNotFound(key.to_string()))?;
.ok_or_else(|| VerifyError::KeyNotFound(key.to_string()))?;

let template_value = template_value_filter.value & template_value_filter.filter;
let config_value = config_value_filter.value & template_value_filter.filter;
Expand Down
6 changes: 3 additions & 3 deletions src/vmm/src/vstate/vm.rs
Original file line number Diff line number Diff line change
Expand Up @@ -170,9 +170,9 @@ impl InterruptSourceGroup for MsiVectorGroup {

fn trigger(&self, index: InterruptIndex) -> vm_device::interrupt::Result<()> {
self.notifier(index)
.ok_or(std::io::Error::other(format!(
"trigger: invalid interrupt index {index}"
)))?
.ok_or_else(|| {
std::io::Error::other(format!("trigger: invalid interrupt index {index}"))
})?
.write(1)
}

Expand Down