style: apply rustfmt to code

Update rustfmt configuration.
Apply rustfmt to the code.
This commit is contained in:
Nikita Pekin
2017-02-17 11:10:29 -05:00
parent 7abd39f8b0
commit 18f7f50f59
2 changed files with 13 additions and 6 deletions
+9 -2
View File
@@ -1,11 +1,18 @@
enum_trailing_comma = true
ideal_width = 80
fn_args_density = "Compressed"
fn_args_layout = "Block"
format_strings = false
ideal_width = 80
match_block_trailing_comma = true
match_wildcard_trailing_comma = true
max_width = 99
normalize_comments = false
reorder_imported_names = true
reorder_imports = true
report_fixme = "Always"
report_todo = "Always"
struct_trailing_comma = "Always"
struct_lit_trailing_comma = "Vertical"
struct_trailing_comma = "Vertical"
where_trailing_comma = true
wrap_comments = true
write_mode = "Overwrite"
+4 -4
View File
@@ -87,7 +87,7 @@ impl<T> LazyCell<T> {
/// Borrows the contents of this lazy cell for the duration of the cell
/// itself.
///
///
/// If the cell has not yet been filled, the cell is first filled using the
/// function provided.
pub fn borrow_with<F: FnOnce() -> T>(&self, f: F) -> &T {
@@ -165,12 +165,12 @@ impl<T> AtomicLazyCell<T> {
}
}
unsafe impl<T: Sync> Sync for AtomicLazyCell<T> { }
unsafe impl<T: Send> Send for AtomicLazyCell<T> { }
unsafe impl<T: Sync> Sync for AtomicLazyCell<T> {}
unsafe impl<T: Send> Send for AtomicLazyCell<T> {}
#[cfg(test)]
mod tests {
use super::{LazyCell, AtomicLazyCell};
use super::{AtomicLazyCell, LazyCell};
#[test]
fn test_borrow_from_empty() {