rust: fix linter errors

This commit is contained in:
Alex Shelkovnykov 2023-12-01 17:32:13 -03:00
parent 93af68268c
commit d4c5a4ff66
3 changed files with 5 additions and 5 deletions

View File

@ -1225,7 +1225,7 @@ unsafe fn write_trace(context: &mut Context) {
let trace_stack = *(context.stack.local_noun_pointer(1) as *mut *const TraceStack);
// Abort writing to trace file if we encountered an error. This should
// result in a well-formed partial trace file.
if let Err(e) = write_nock_trace(&mut context.stack, info, trace_stack) {
if let Err(_e) = write_nock_trace(&mut context.stack, info, trace_stack) {
// XX: need NockStack allocated string interpolation
// eprintln!("\rserf: error writing nock trace to file: {:?}", e);
context.trace_info = None;
@ -1302,8 +1302,8 @@ mod hint {
}
}
Err(error) => {
let stack = &mut context.stack;
// XX: need NockStack allocated string interpolation
// let stack = &mut context.stack;
// let tape = tape(stack, "jet mismatch in {}, raw: {}, jetted: {}", jet_name, err, jet_res);
// let mean = T(stack, &[D(tas!(b"mean")), tape]);
// mean_push(stack, mean);
@ -1322,8 +1322,8 @@ mod hint {
}
Err(JetErr::Punt) => None,
Err(err) => {
let stack = &mut context.stack;
// XX: need NockStack allocated string interpolation
// let stack = &mut context.stack;
// let tape = tape(stack, "{} jet error in {}", err, jet_name);
// let mean = T(stack, &[D(tas!(b"mean")), tape]);
// mean_push(stack, mean);

View File

@ -208,7 +208,7 @@ pub fn serf() -> io::Result<()> {
None
};
if let Some(ref mut info) = trace_info.as_mut() {
if let Err(e) = write_metadata(info) {
if let Err(_e) = write_metadata(info) {
// XX: need NockStack allocated string interpolation
// eprintln!("\rError initializing trace file: {:?}", e);
trace_info = None;

View File

@ -99,7 +99,7 @@ pub fn write_metadata(info: &mut TraceInfo) -> Result<(), Error> {
///
/// This should result in a well-formed partial trace file.
pub fn write_serf_trace_safe(info: &mut Option<TraceInfo>, name: &str, start: Instant) {
if let Err(e) = write_serf_trace(info.as_mut().unwrap(), name, start) {
if let Err(_e) = write_serf_trace(info.as_mut().unwrap(), name, start) {
// XX: need NockStack allocated string interpolation
// eprintln!("\rserf: error writing event trace to file: {:?}", e);
*info = None;