Skip to content

Commit

Permalink
Update rustfmt config
Browse files Browse the repository at this point in the history
  • Loading branch information
MikailBag committed Sep 20, 2019
1 parent 780b026 commit 8342793
Show file tree
Hide file tree
Showing 11 changed files with 25 additions and 10 deletions.
2 changes: 1 addition & 1 deletion cli/src/submissions.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ pub fn exec(opt: Opt, params: &super::CommonParams) -> Value {
// at first, load submissions from DB
// TODO optimizations
let vars = crate::queries::list_runs::Variables { detailed: true };
// FIXME: ^
// TODO: ^
// should be false here
// see https://github.com/graphql-rust/graphql-client/issues/250
let query = crate::queries::ListRuns::build_query(vars);
Expand Down
2 changes: 1 addition & 1 deletion db/src/repo.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ pub trait RunsRepo: Send + Sync {
fn run_update(&self, run_id: RunId, patch: RunPatch) -> Result<(), Error>;
fn run_delete(&self, run_id: RunId) -> Result<(), Error>;
fn run_select(&self, with_run_id: Option<RunId>, limit: Option<u32>)
-> Result<Vec<Run>, Error>;
-> Result<Vec<Run>, Error>;
}

pub trait InvocationRequestsRepo: Send + Sync {
Expand Down
5 changes: 4 additions & 1 deletion deploy/bin/configure.rs
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,10 @@ fn check_build_dir(_src: &str, build: &str) {
if std::path::PathBuf::from(&dot_build_file).exists() {
return;
}
eprintln!("maybe, assumed build dir ({}) contains some important files. If you are sure, add .jjsbuild in this dir", build);
eprintln!(
"maybe, assumed build dir ({}) contains some important files. If you are sure, add .jjsbuild in this dir",
build
);
std::process::exit(1);
}

Expand Down
2 changes: 1 addition & 1 deletion devtool/src/check.rs
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ fn shellcheck(runner: &Runner) {
for script_chunk in scripts.chunks(SCRIPTS_CHECK_BATCH_SIZE) {
let mut cmd = Command::new("shellcheck");
cmd.arg("--color=always");
// FIXME: cmd.arg("--check-sourced");
// TODO: cmd.arg("--check-sourced");
// requires using fresh shellcheck on CI
for scr in script_chunk {
debug!("checking script {}", scr.display());
Expand Down
5 changes: 4 additions & 1 deletion envck/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,10 @@ fn main() {
build: vec![],
};
if version < min_version {
eprintln!("error: Linux Kernel version {} is unsupported. Minimal supported version is currently {}", version, min_version);
eprintln!(
"error: Linux Kernel version {} is unsupported. Minimal supported version is currently {}",
version, min_version
);
}
}
println!("OK");
Expand Down
2 changes: 1 addition & 1 deletion frontend-engine/src/gql_server/context.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ use std::sync::Arc;

pub(crate) type DbPool = Arc<dyn db::DbConn>;

//FIXME: Do not clone Context on every request
//TODO: Do not clone Context on every request
pub(crate) struct ContextData {
pub(crate) db: DbPool,
pub(crate) cfg: Arc<cfg::Config>,
Expand Down
2 changes: 1 addition & 1 deletion frontend-engine/src/gql_server/users.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ pub(super) fn create(
password: String,
groups: Vec<String>,
) -> ApiResult<schema::User> {
// FIXME transaction
// TODO transaction
let cur_user = ctx.db.user_try_load_by_login(&login).internal(ctx)?;
if let Some(..) = cur_user {
let mut ext = ErrorExtension::new();
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ fn launch_api(frcfg: FrontendConfig, logger: Logger, config: cfg::Config) {

fn launch_root_login_server(logger: &slog::Logger, fcfg: FrontendConfig) {
let cfg = frontend_engine::root_auth::Config {
socket_path: String::from("/tmp/jjs-auth-sock"), /* FIXME dehardcode */
socket_path: String::from("/tmp/jjs-auth-sock"), /* TODO dehardcode */
};
let sublogger = logger.new(slog::o!("app" => "jjs:frontend:localauth"));
frontend_engine::root_auth::LocalAuthServer::start(sublogger, cfg.clone(), &fcfg);
Expand Down
5 changes: 4 additions & 1 deletion invoker/src/invoke_context.rs
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,10 @@ impl<'a> InvokeContext<'a> {
let item = item.context(err::Io {})?;
let item_type = item.file_type().context(err::Io {})?;
if !item_type.is_dir() {
panic!("couldn't link child chroot, because it contains toplevel-item `{:?}`, which is not directory", item.file_name());
panic!(
"couldn't link child chroot, because it contains toplevel-item `{:?}`, which is not directory",
item.file_name()
);
}
let name = item.file_name();
let peo = minion::PathExpositionOptions {
Expand Down
2 changes: 1 addition & 1 deletion minion-cli/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ fn parse_path_exposition_item(src: &str) -> Result<minion::PathExpositionOptions
return Err(format!(
"unknown access mask {}. rwx or r-x expected",
amask
))
));
}
};
Ok(minion::PathExpositionOptions {
Expand Down
6 changes: 6 additions & 0 deletions rustfmt.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,9 @@ reorder_modules = true
reorder_impl_items = true
use_field_init_shorthand = true
format_code_in_doc_comments = true
edition = "2018"
merge_derives = true
newline_style = "Unix"
report_fixme = "Unnumbered"
unstable_features = true
version = "Two"

0 comments on commit 8342793

Please sign in to comment.