Update dependencies

This commit is contained in:
Jeremy Soller
2021-04-28 20:42:59 -06:00
parent 16e4064624
commit bee08cbdf1
3 changed files with 16 additions and 15 deletions
Generated
+7 -7
View File
@@ -15,7 +15,7 @@ name = "chrono"
version = "0.4.19"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"libc 0.2.82 (registry+https://github.com/rust-lang/crates.io-index)",
"libc 0.2.94 (registry+https://github.com/rust-lang/crates.io-index)",
"num-integer 0.1.44 (registry+https://github.com/rust-lang/crates.io-index)",
"num-traits 0.2.14 (registry+https://github.com/rust-lang/crates.io-index)",
"time 0.1.44 (registry+https://github.com/rust-lang/crates.io-index)",
@@ -24,7 +24,7 @@ dependencies = [
[[package]]
name = "libc"
version = "0.2.82"
version = "0.2.94"
source = "registry+https://github.com/rust-lang/crates.io-index"
[[package]]
@@ -32,7 +32,7 @@ name = "logd"
version = "0.1.0"
dependencies = [
"chrono 0.4.19 (registry+https://github.com/rust-lang/crates.io-index)",
"redox_syscall 0.2.4 (registry+https://github.com/rust-lang/crates.io-index)",
"redox_syscall 0.2.7 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
@@ -54,7 +54,7 @@ dependencies = [
[[package]]
name = "redox_syscall"
version = "0.2.4"
version = "0.2.7"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"bitflags 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)",
@@ -65,7 +65,7 @@ name = "time"
version = "0.1.44"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"libc 0.2.82 (registry+https://github.com/rust-lang/crates.io-index)",
"libc 0.2.94 (registry+https://github.com/rust-lang/crates.io-index)",
"wasi 0.10.0+wasi-snapshot-preview1 (registry+https://github.com/rust-lang/crates.io-index)",
"winapi 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)",
]
@@ -98,10 +98,10 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
"checksum autocfg 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)" = "cdb031dd78e28731d87d56cc8ffef4a8f36ca26c38fe2de700543e627f8a464a"
"checksum bitflags 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "cf1de2fe8c75bc145a2f577add951f8134889b4795d47466a54a5c846d691693"
"checksum chrono 0.4.19 (registry+https://github.com/rust-lang/crates.io-index)" = "670ad68c9088c2a963aaa298cb369688cf3f9465ce5e2d4ca10e6e0098a1ce73"
"checksum libc 0.2.82 (registry+https://github.com/rust-lang/crates.io-index)" = "89203f3fba0a3795506acaad8ebce3c80c0af93f994d5a1d7a0b1eeb23271929"
"checksum libc 0.2.94 (registry+https://github.com/rust-lang/crates.io-index)" = "18794a8ad5b29321f790b55d93dfba91e125cb1a9edbd4f8e3150acc771c1a5e"
"checksum num-integer 0.1.44 (registry+https://github.com/rust-lang/crates.io-index)" = "d2cc698a63b549a70bc047073d2949cce27cd1c7b0a4a862d08a8031bc2801db"
"checksum num-traits 0.2.14 (registry+https://github.com/rust-lang/crates.io-index)" = "9a64b1ec5cda2586e284722486d802acf1f7dbdc623e2bfc57e65ca1cd099290"
"checksum redox_syscall 0.2.4 (registry+https://github.com/rust-lang/crates.io-index)" = "05ec8ca9416c5ea37062b502703cd7fcb207736bc294f6e0cf367ac6fc234570"
"checksum redox_syscall 0.2.7 (registry+https://github.com/rust-lang/crates.io-index)" = "85dd92e586f7355c633911e11f77f3d12f04b1b1bd76a198bd34ae3af8341ef2"
"checksum time 0.1.44 (registry+https://github.com/rust-lang/crates.io-index)" = "6db9e6914ab8b1ae1c260a4ae7a49b6c5611b40328a735b21862567685e73255"
"checksum wasi 0.10.0+wasi-snapshot-preview1 (registry+https://github.com/rust-lang/crates.io-index)" = "1a143597ca7c7793eff794def352d41792a93c481eb1042423ff7ff72ba2c31f"
"checksum winapi 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)" = "5c839a674fcd7a98952e593242ea400abe93992746761e38641405d28b00f419"
+2 -2
View File
@@ -4,5 +4,5 @@ version = "0.1.0"
authors = ["Jeremy Soller <jackpot51@gmail.com>"]
[dependencies]
chrono = "0.4.11"
redox_syscall = "0.2.4"
chrono = "0.4.19"
redox_syscall = "0.2.7"
+7 -6
View File
@@ -5,7 +5,7 @@ use syscall::error::*;
use syscall::scheme::SchemeMut;
pub struct LogHandle {
context: Box<[u8]>,
context: Box<str>,
buf: Vec<u8>,
}
@@ -24,12 +24,12 @@ impl LogScheme {
}
impl SchemeMut for LogScheme {
fn open(&mut self, path: &[u8], _flags: usize, _uid: u32, _gid: u32) -> Result<usize> {
fn open(&mut self, path: &str, _flags: usize, _uid: u32, _gid: u32) -> Result<usize> {
let id = self.next_id;
self.next_id += 1;
self.handles.insert(id, LogHandle {
context: path.to_vec().into_boxed_slice(),
context: path.to_string().into_boxed_str(),
buf: Vec::new()
});
@@ -64,7 +64,7 @@ impl SchemeMut for LogScheme {
if handle.buf.is_empty() {
let timestamp = Local::now();
let _ = write!(handle.buf, "{}", timestamp.format("%F %T%.f "));
handle.buf.extend_from_slice(&handle.context);
handle.buf.extend_from_slice(handle.context.as_bytes());
handle.buf.extend_from_slice(b": ");
}
@@ -101,8 +101,9 @@ impl SchemeMut for LogScheme {
}
let mut j = 0;
while i < buf.len() && j < handle.context.len() {
buf[i] = handle.context[j];
let context_bytes = handle.context.as_bytes();
while i < buf.len() && j < context_bytes.len() {
buf[i] = context_bytes[j];
i += 1;
j += 1;
}