summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJaePil Jung <jjp5023@gmail.com>2019-01-25 00:54:43 +0900
committerRyan Dahl <ry@tinyclouds.org>2019-01-24 10:54:43 -0500
commit7f88b5fff3fe8aed2073d4347d3ab847fc4c528a (patch)
tree5391a4d6ca9ec2add34719baeaf4dbd884c79b07
parent2547f0296fc77357b9c11f3bdc7414a68243e775 (diff)
Minor code cleanups (#1570)
-rw-r--r--.appveyor.yml2
-rw-r--r--.travis.yml2
-rw-r--r--libdeno/deno.gni2
-rw-r--r--src/isolate.rs3
-rwxr-xr-xtools/lint.py3
-rwxr-xr-xtools/run_node.py7
6 files changed, 9 insertions, 10 deletions
diff --git a/.appveyor.yml b/.appveyor.yml
index 5bf1c9c5c..3c9b5dd0e 100644
--- a/.appveyor.yml
+++ b/.appveyor.yml
@@ -1,4 +1,4 @@
-# Copyright 2018 the Deno authors. All rights reserved. MIT license.
+# Copyright 2018-2019 the Deno authors. All rights reserved. MIT license.
version: '{build}.{branch}'
skip_branch_with_pr: true
diff --git a/.travis.yml b/.travis.yml
index 18e32a734..50c0c1317 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -1,4 +1,4 @@
-# Copyright 2018 the Deno authors. All rights reserved. MIT license.
+# Copyright 2018-2019 the Deno authors. All rights reserved. MIT license.
sudo: false
language: c++
git:
diff --git a/libdeno/deno.gni b/libdeno/deno.gni
index 64869a284..41627ea13 100644
--- a/libdeno/deno.gni
+++ b/libdeno/deno.gni
@@ -1,4 +1,4 @@
-# Copyright 2018 the Deno authors. All rights reserved. MIT license.
+# Copyright 2018-2019 the Deno authors. All rights reserved. MIT license.
import("//build/compiled_action.gni")
template("run_node") {
diff --git a/src/isolate.rs b/src/isolate.rs
index 5100ac490..7d1fdf71d 100644
--- a/src/isolate.rs
+++ b/src/isolate.rs
@@ -28,6 +28,7 @@ use std::sync::atomic::{AtomicUsize, Ordering};
use std::sync::mpsc;
use std::sync::Arc;
use std::sync::Mutex;
+use std::sync::{Once, ONCE_INIT};
use std::time::Duration;
use std::time::Instant;
use tokio;
@@ -156,7 +157,7 @@ pub struct Metrics {
pub bytes_received: AtomicUsize,
}
-static DENO_INIT: std::sync::Once = std::sync::ONCE_INIT;
+static DENO_INIT: Once = ONCE_INIT;
impl Isolate {
pub fn new(
diff --git a/tools/lint.py b/tools/lint.py
index 94b79739c..4c38d3c69 100755
--- a/tools/lint.py
+++ b/tools/lint.py
@@ -4,11 +4,10 @@
import os
import sys
-from util import enable_ansi_colors, run, find_exts
+from util import enable_ansi_colors, find_exts, root_path, run
enable_ansi_colors()
-root_path = os.path.dirname(os.path.dirname(os.path.realpath(__file__)))
third_party_path = os.path.join(root_path, "third_party")
cpplint = os.path.join(third_party_path, "cpplint", "cpplint.py")
tslint = os.path.join(third_party_path, "node_modules", "tslint", "bin",
diff --git a/tools/run_node.py b/tools/run_node.py
index 4023f7586..f1221bcd4 100755
--- a/tools/run_node.py
+++ b/tools/run_node.py
@@ -8,13 +8,12 @@ Before running node, we symlink js/node_modules to out/Debug/node_modules.
import subprocess
import sys
import os
-import util
+from util import remove_and_symlink, root_path, run
-root_path = os.path.dirname(os.path.dirname(os.path.realpath(__file__)))
tools_path = os.path.join(root_path, "tools")
third_party_path = os.path.join(root_path, "third_party")
target_abs = os.path.join(third_party_path, "node_modules")
target_rel = os.path.relpath(target_abs)
-util.remove_and_symlink(target_rel, "node_modules", True)
-util.run(["node"] + sys.argv[1:], quiet=True)
+remove_and_symlink(target_rel, "node_modules", True)
+run(["node"] + sys.argv[1:], quiet=True)