Skip to content

Commit

Permalink
chore(format): run formatter
Browse files Browse the repository at this point in the history
  • Loading branch information
oddlama committed Mar 3, 2023
1 parent 9c9beda commit 59e35a2
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 8 deletions.
11 changes: 9 additions & 2 deletions src/bin/autokernel-index.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ use std::path::PathBuf;
use std::process::{Command, Stdio};
use std::time::Instant;

use anyhow::{bail, Ok, Result, ensure, Context};
use anyhow::{bail, ensure, Context, Ok, Result};
use clap::Parser;
use colored::Colorize;

Expand Down Expand Up @@ -84,7 +84,14 @@ fn main() -> Result<()> {
.context("Failed to generate defconfig")?
.success());
let defconfig = args.kernel_dir.join(".config");
index_values(&bridge, &tx, &kernel_id, "defconfig", Some(&defconfig), bridge.get_env("ARCH").as_ref())?;
index_values(
&bridge,
&tx,
&kernel_id,
"defconfig",
Some(&defconfig),
bridge.get_env("ARCH").as_ref(),
)?;

tx.commit()?;
}
Expand Down
3 changes: 2 additions & 1 deletion src/bridge/vtable.rs
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,8 @@ impl BridgeVTable {
let c_sym_calc_value = load_symbol!(FuncSymCalcValue, b"sym_calc_value");
let c_sym_int_get_min = load_symbol!(FuncSymIntGetMin, b"sym_int_get_min");
let c_sym_int_get_max = load_symbol!(FuncSymIntGetMin, b"sym_int_get_max");
let c_sym_direct_deps_with_prompts = load_symbol!(FuncSymDirectDepsWithPrompts, b"sym_direct_deps_with_prompts");
let c_sym_direct_deps_with_prompts =
load_symbol!(FuncSymDirectDepsWithPrompts, b"sym_direct_deps_with_prompts");
let c_sym_prompt_count = load_symbol!(FuncSymPromptCount, b"sym_prompt_count");
let c_conf_write = load_symbol!(FuncConfWrite, b"conf_write");
let c_conf_read_unchecked = load_symbol!(FuncConfReadUnchecked, b"conf_read");
Expand Down
2 changes: 1 addition & 1 deletion src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
pub mod bridge;
pub mod script;
pub mod config;
pub mod script;
4 changes: 1 addition & 3 deletions src/script/lua.rs
Original file line number Diff line number Diff line change
Expand Up @@ -168,9 +168,7 @@ impl Script for LuaScript {
}
})?;

let kernel_env = scope.create_function(|_, name: String| {
StdOk(bridge.get_env(&name))
})?;
let kernel_env = scope.create_function(|_, name: String| StdOk(bridge.get_env(&name)))?;

let ak = lua_ctx.create_table()?;
ak.set("kernel_dir", bridge.kernel_dir.to_str())?;
Expand Down
2 changes: 1 addition & 1 deletion src/script/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ mod kconfig;
mod lua;
use crate::bridge::Bridge;

use std::path::Path;
use anyhow::{bail, Ok, Result};
use std::path::Path;

use colored::Colorize;
pub use kconfig::KConfig;
Expand Down

0 comments on commit 59e35a2

Please sign in to comment.