Skip to content

Commit

Permalink
add rustfmt.toml in runtime
Browse files Browse the repository at this point in the history
  • Loading branch information
SKTT1Ryze committed Oct 11, 2023
1 parent 8dc4816 commit 70db8b5
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 6 deletions.
1 change: 1 addition & 0 deletions runtime/rust-toolchain
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
nightly
9 changes: 9 additions & 0 deletions runtime/rustfmt.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
error_on_line_overflow = false
format_strings = true
normalize_comments = true
imports_granularity = "Crate"
reorder_modules = true
# enum_discrim_align_threshold = 20
use_try_shorthand = true
wrap_comments = true
edition = "2021"
9 changes: 5 additions & 4 deletions runtime/src/container.rs
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
use std::collections::HashMap;
use std::sync::{Arc, Mutex};
use std::{
collections::HashMap,
sync::{Arc, Mutex},
};

use leetcode::problems::Problem;
use leetcode::solutions::Solution;
use leetcode::{problems::Problem, solutions::Solution};

#[derive(Default)]
pub struct Container {
Expand Down
3 changes: 1 addition & 2 deletions runtime/src/registration.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
use super::container::ContainerHandle;

use leetcode::problems;
use leetcode::solutions;
use leetcode::{problems, solutions};

pub fn register_all(handle: ContainerHandle) -> anyhow::Result<()> {
handle.register_problem(|_| problems::two_sum::TwoSum)?;
Expand Down

0 comments on commit 70db8b5

Please sign in to comment.