Skip to content

Commit

Permalink
Auto merge of #12 - indiv0:feat_rustfmt, r=indiv0
Browse files Browse the repository at this point in the history
Apply `rustfmt` to Project
  • Loading branch information
homu committed Mar 16, 2016
2 parents 3ee005d + 6ba9c3e commit 1737499
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 3 deletions.
19 changes: 19 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,22 @@
<a name="v0.1.0"></a>
## v0.1.0 (2016-03-16)


#### Features

* **lib.rs:** implement Default trait for LazyCell ([150a6304](https://github.com/indiv0/LazyCell/commit/150a6304a230ee1de8424e49c447ec1b2d6578ce))

#### Chore

* increase version ([fa5a6b66](https://github.com/indiv0/LazyCell/commit/fa5a6b66e857ea9d6a645c199d959db4983bbe4d))
* **Cargo.toml:** update include directive ([c3142949](https://github.com/indiv0/LazyCell/commit/c3142949d50b0288d46f6ef4ca1f06f2b96d34f4), closes [#9](https://github.com/indiv0/LazyCell/issues/9))

#### Style

* **lib.rs:** apply consistent style with rustfmt ([968f5460](https://github.com/indiv0/LazyCell/commit/968f5460f5b3b4ab15e21480a8f13b7fd4dc807c))



<a name="v0.0.1"></a>
## v0.0.1 (2016-03-16)

Expand Down
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "lazycell"
version = "0.0.2"
version = "0.1.0"
authors = ["Alex Crichton <[email protected]>",
"Nikita Pekin <[email protected]>"]
description = "A library providing a lazily filled Cell struct"
Expand Down
6 changes: 4 additions & 2 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,9 @@ impl<T> LazyCell<T> {
}

/// Test whether this cell has been previously filled.
pub fn filled(&self) -> bool { self.inner.borrow().is_some() }
pub fn filled(&self) -> bool {
self.inner.borrow().is_some()
}

/// Borrows the contents of this lazy cell for the duration of the cell
/// itself.
Expand All @@ -61,7 +63,7 @@ impl<T> LazyCell<T> {
pub fn borrow(&self) -> Option<&T> {
match *self.inner.borrow() {
Some(ref inner) => unsafe { Some(mem::transmute(inner)) },
None => None
None => None,
}
}

Expand Down

0 comments on commit 1737499

Please sign in to comment.