mirror of
https://github.com/denoland/deno.git
synced 2025-03-03 17:34:47 -05:00
cleanup(core): flatten print's op args (#10643)
This commit is contained in:
parent
808226f110
commit
d059f9b06e
2 changed files with 3 additions and 4 deletions
|
@ -129,7 +129,7 @@
|
|||
}
|
||||
|
||||
function print(str, isErr = false) {
|
||||
opSync("op_print", [str, isErr]);
|
||||
opSync("op_print", str, isErr);
|
||||
}
|
||||
|
||||
// Provide bootstrap namespace
|
||||
|
|
|
@ -57,10 +57,9 @@ pub fn op_close(
|
|||
/// Builtin utility to print to stdout/stderr
|
||||
pub fn op_print(
|
||||
_state: &mut OpState,
|
||||
args: (String, bool),
|
||||
_: (),
|
||||
msg: String,
|
||||
is_err: bool,
|
||||
) -> Result<(), AnyError> {
|
||||
let (msg, is_err) = args;
|
||||
if is_err {
|
||||
eprint!("{}", msg);
|
||||
stderr().flush().unwrap();
|
||||
|
|
Loading…
Add table
Reference in a new issue