Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove unmaintained spin crate. #178

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,12 @@ keywords = ["macro", "lazy", "static"]
categories = [ "no-std", "rust-patterns", "memory-management" ]
exclude = ["/.travis.yml", "/appveyor.yml"]

[dependencies.spin]
version = "0.5.0"
[dependencies.spinning]
version = "0.0.3"
optional = true

[features]
spin_no_std = ["spin"]
spin_no_std = ["spinning"]

[dev-dependencies]
doc-comment = "0.3.1"
Expand Down
6 changes: 3 additions & 3 deletions src/core_lazy.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,14 @@
// http://opensource.org/licenses/MIT>, at your option. This file may not be
// copied, modified, or distributed except according to those terms.

extern crate spin;
extern crate spinning;

use self::spin::Once;
use self::spinning::Once;

pub struct Lazy<T: Sync>(Once<T>);

impl<T: Sync> Lazy<T> {
pub const INIT: Self = Lazy(Once::INIT);
pub const INIT: Self = Lazy(Once::new());

#[inline(always)]
pub fn get<F>(&'static self, builder: F) -> &T
Expand Down
2 changes: 1 addition & 1 deletion src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ The `Deref` implementation uses a hidden static variable that is guarded by an a

This crate provides one cargo feature:

- `spin_no_std`: This allows using this crate in a no-std environment, by depending on the standalone `spin` crate.
- `spin_no_std`: This allows using this crate in a no-std environment, by depending on the standalone `spinning` crate.

*/

Expand Down