1
0
Fork 0
mirror of https://github.com/denoland/deno.git synced 2025-01-03 04:48:52 -05:00

Minor code cleanups (#1613)

This commit is contained in:
JaePil Jung 2019-01-30 00:37:27 +09:00 committed by Ryan Dahl
parent ee9c627cc5
commit dc09c3a65d
2 changed files with 6 additions and 5 deletions

View file

@ -14,7 +14,7 @@ int main(int argc, char** argv) {
const char* snapshot_out_bin = argv[1];
const char* js_fn = argv[2];
v8::V8::SetFlagsFromCommandLine(&argc, argv, true);
deno_set_v8_flags(&argc, argv);
CHECK_NE(js_fn, nullptr);
CHECK_NE(snapshot_out_bin, nullptr);

View file

@ -34,6 +34,7 @@ pub mod workers;
#[cfg(unix)]
mod eager_unix;
use log::{LevelFilter, Metadata, Record};
use std::env;
use std::sync::Arc;
@ -42,11 +43,11 @@ static LOGGER: Logger = Logger;
struct Logger;
impl log::Log for Logger {
fn enabled(&self, metadata: &log::Metadata<'_>) -> bool {
fn enabled(&self, metadata: &Metadata) -> bool {
metadata.level() <= log::max_level()
}
fn log(&self, record: &log::Record<'_>) {
fn log(&self, record: &Record) {
if self.enabled(record.metadata()) {
println!("{} RS - {}", record.level(), record.args());
}
@ -74,9 +75,9 @@ fn main() {
}
log::set_max_level(if flags.log_debug {
log::LevelFilter::Debug
LevelFilter::Debug
} else {
log::LevelFilter::Warn
LevelFilter::Warn
});
let should_prefetch = flags.prefetch;