mirror of
https://github.com/rtic-rs/rtic.git
synced 2024-11-27 14:04:56 +01:00
cargo fmt
This commit is contained in:
parent
2b8e743f35
commit
7ce052be37
3 changed files with 17 additions and 17 deletions
|
@ -38,10 +38,10 @@ pub fn app(app: &App) -> parse::Result<()> {
|
||||||
// Check that all late resources have been initialized in `#[init]` if `init` has signature
|
// Check that all late resources have been initialized in `#[init]` if `init` has signature
|
||||||
// `fn()`
|
// `fn()`
|
||||||
if !app.init.returns_late_resources {
|
if !app.init.returns_late_resources {
|
||||||
for res in app
|
for res in
|
||||||
.resources
|
app.resources
|
||||||
.iter()
|
.iter()
|
||||||
.filter_map(|(name, res)| if res.expr.is_none() { Some(name) } else { None })
|
.filter_map(|(name, res)| if res.expr.is_none() { Some(name) } else { None })
|
||||||
{
|
{
|
||||||
if app.init.assigns.iter().all(|assign| assign.left != *res) {
|
if app.init.assigns.iter().all(|assign| assign.left != *res) {
|
||||||
return Err(parse::Error::new(
|
return Err(parse::Error::new(
|
||||||
|
|
|
@ -47,7 +47,9 @@ pub struct Priority {
|
||||||
impl Priority {
|
impl Priority {
|
||||||
#[inline(always)]
|
#[inline(always)]
|
||||||
pub unsafe fn new(value: u8) -> Self {
|
pub unsafe fn new(value: u8) -> Self {
|
||||||
Priority { inner: Cell::new(value)}
|
Priority {
|
||||||
|
inner: Cell::new(value),
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// these two methods are used by claim (see below) but can't be used from the RTFM application
|
// these two methods are used by claim (see below) but can't be used from the RTFM application
|
||||||
|
|
|
@ -38,18 +38,16 @@ fn cfail() {
|
||||||
let f = f.unwrap().path();
|
let f = f.unwrap().path();
|
||||||
let name = f.file_stem().unwrap().to_str().unwrap();
|
let name = f.file_stem().unwrap().to_str().unwrap();
|
||||||
|
|
||||||
assert!(
|
assert!(Command::new("rustc")
|
||||||
Command::new("rustc")
|
.args(s.split_whitespace())
|
||||||
.args(s.split_whitespace())
|
.arg(f.display().to_string())
|
||||||
.arg(f.display().to_string())
|
.arg("-o")
|
||||||
.arg("-o")
|
.arg(td.path().join(name).display().to_string())
|
||||||
.arg(td.path().join(name).display().to_string())
|
.arg("-C")
|
||||||
.arg("-C")
|
.arg("linker=true")
|
||||||
.arg("linker=true")
|
.status()
|
||||||
.status()
|
.unwrap()
|
||||||
.unwrap()
|
.success());
|
||||||
.success()
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
config.target_rustcflags = Some(s);
|
config.target_rustcflags = Some(s);
|
||||||
|
|
Loading…
Reference in a new issue