Skip to content

Commit 335ba1f

Browse files
Fix
1 parent 79f5bb9 commit 335ba1f

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

llrt_core/src/modules/console.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -442,7 +442,7 @@ fn format_raw_inner<'js>(
442442
if !(value.is_function() && filter_functions) {
443443
numeric_key = if key.parse::<f64>().is_ok() { !0 } else { 0 };
444444
write_sep(result, first > 0, apply_indentation > 0, options.newline);
445-
push_indentation(result, apply_indentation & depth + 1);
445+
push_indentation(result, apply_indentation & (depth + 1));
446446
if depth > MAX_INDENTATION_LEVEL - 1 {
447447
result.push(SPACING);
448448
}
@@ -468,7 +468,7 @@ fn format_raw_inner<'js>(
468468
}
469469
}
470470
result.push_str(
471-
LINE_BREAK_LOOKUP[first & apply_indentation & 1 + (options.newline as usize)],
471+
LINE_BREAK_LOOKUP[first & apply_indentation & (1 + (options.newline as usize))],
472472
);
473473
result.push_str(SPACING_LOOKUP[first & !apply_indentation & 1]);
474474
push_indentation(result, first & apply_indentation & depth);

llrt_core/src/number.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -192,10 +192,10 @@ pub fn number_to_string(ctx: Ctx, this: This<Value>, radix: Opt<u8>) -> Result<S
192192
Ok("".into())
193193
}
194194

195-
pub fn float_to_string<'a>(buffer: &'a mut ryu::Buffer, float: f64) -> Result<&'a str> {
195+
pub fn float_to_string(buffer: &mut ryu::Buffer, float: f64) -> Result<&str> {
196196
let str = match float_to_str(buffer, float) {
197197
Ok(value) => value,
198-
Err(value) => return Ok(value.into()),
198+
Err(value) => return Ok(value),
199199
};
200200
let len = str.len();
201201
if unsafe { str.get_unchecked(str.len() - 2..) } == ".0" {

0 commit comments

Comments
 (0)