Skip to content

Commit

Permalink
fmt and fix spelling
Browse files Browse the repository at this point in the history
  • Loading branch information
wilyle committed Nov 27, 2023
1 parent a4b2b95 commit d0b785c
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 8 deletions.
4 changes: 4 additions & 0 deletions .accepted_words.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ CHARIOTT
Chariott
Chariott's
chariott
cfg
com
config
containerized
Expand Down Expand Up @@ -67,6 +68,7 @@ ps
repo
Repo
rm
RUSTFLAGS
rustup
sdk
sdl
Expand All @@ -76,6 +78,8 @@ snapd
standalone
sudo
timothee
tokio
Tokio
toml
Tonic
toolchain
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ Ibeji has support for using the [tokio console](https://github.com/tokio-rs/cons
RUSTFLAGS="--cfg tokio_unstable" cargo build --features tokio_console
```

Note that the tokio console will intercept trace-level logs, so these will not be visible when debugging wih the tokio console.
Note that the tokio console will intercept trace-level logs, so these will not be visible when debugging with the tokio console.

## <a name="running-the-tests">Running the Tests</a>

Expand Down
12 changes: 5 additions & 7 deletions core/invehicle-digital-twin/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -143,10 +143,7 @@ async fn main() -> Result<(), Box<dyn std::error::Error>> {
.skip(1)
.map(|arg| {
let mut split = arg.split('=');
let key = split
.next()
.expect("Couldn't parse argument key")
.to_owned();
let key = split.next().expect("Couldn't parse argument key").to_owned();
let val = split.next().map(|v| v.to_owned());

if split.next().is_some() {
Expand All @@ -160,12 +157,13 @@ async fn main() -> Result<(), Box<dyn std::error::Error>> {
debug!("args: {args:?}");

// Setup logging
let log_level_arg = args.get("--log-level")
let log_level_arg = args
.get("--log-level")
.cloned()
.unwrap_or(Some(DEFAULT_LOG_LEVEL.to_owned()))
.expect("No log-level value provided");
let log_level = LevelFilter::from_str(log_level_arg.as_str())
.expect("Could not parse log level");
let log_level =
LevelFilter::from_str(log_level_arg.as_str()).expect("Could not parse log level");
Builder::new().filter(None, log_level).target(Target::Stdout).init();

#[cfg(feature = "tokio_console")]
Expand Down

0 comments on commit d0b785c

Please sign in to comment.