mirror of
https://github.com/fish-shell/fish-shell.git
synced 2026-04-19 23:21:15 -03:00
Stop using sprintf in builtin_random
This commit is contained in:
@@ -162,6 +162,6 @@ fn parse_ull(streams: &mut io_streams_t, cmd: &wstr, num: &wstr) -> Result<u64,
|
||||
// Safe because end was a valid i64 and the result here is in the range start..=end.
|
||||
let result: i64 = start.checked_add_unsigned(rand * step).unwrap();
|
||||
|
||||
streams.out.append(sprintf!(L!("%lld\n"), result));
|
||||
streams.out.appendln(result.to_wstring());
|
||||
return STATUS_CMD_OK;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user