Skip to content

Commit

Permalink
cargo fmt
Browse files Browse the repository at this point in the history
  • Loading branch information
sharksforarms committed Apr 9, 2021
1 parent 4293a44 commit 861bc54
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions deku-derive/src/macros/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,12 @@ pub(crate) mod deku_write;

#[cfg(feature = "proc-macro-crate")]
fn get_crate_name() -> Ident {
let found_crate = proc_macro_crate::crate_name("deku").unwrap_or(proc_macro_crate::FoundCrate::Itself);
let found_crate =
proc_macro_crate::crate_name("deku").unwrap_or(proc_macro_crate::FoundCrate::Itself);

let crate_name = match found_crate {
proc_macro_crate::FoundCrate::Itself => "deku".to_string(),
proc_macro_crate::FoundCrate::Name(name) => name
proc_macro_crate::FoundCrate::Name(name) => name,
};

Ident::new(&crate_name, Span::call_site())
Expand Down

0 comments on commit 861bc54

Please sign in to comment.