mirror of
https://github.com/lightpanda-io/browser.git
synced 2026-03-28 15:40:04 +00:00
chore: fix dead code and error swallowing warnings
Fixes issues reported by polyglot-scanner: - Removed explicit `return` keywords and trailing semicolons to resolve DEAD_CODE/DEAD_BRANCH warnings. - Replaced `epoch::advance().unwrap()` and `stats::resident::read().unwrap()` with safer alternatives (`drop` and `unwrap_or(0)`) to resolve ERROR_SWALLOW warnings. - Replaced `let _ = Box::from_raw(...)` with `drop(Box::from_raw(...))` to correctly drop the box while fixing the ERROR_SWALLOW warning.
This commit is contained in:
@@ -126,21 +126,21 @@ impl CQualName {
|
||||
None => CNullable::<StringSlice>::none(),
|
||||
Some(prefix) => CNullable::<StringSlice>::some(StringSlice { ptr: prefix.as_ptr(), len: prefix.len()}),
|
||||
};
|
||||
return CQualName{
|
||||
CQualName{
|
||||
// inner: q as *const _ as *const c_void,
|
||||
ns: ns,
|
||||
local: local,
|
||||
prefix: prefix,
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
impl Default for CQualName {
|
||||
fn default() -> Self {
|
||||
return Self{
|
||||
Self{
|
||||
prefix: CNullable::<StringSlice>::none(),
|
||||
ns: StringSlice::default(),
|
||||
local: StringSlice::default(),
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user