Update to 0.2.0

Signed-off-by: Igor Gnatenko <ignatenkobrain@fedoraproject.org>
epel9
Igor Gnatenko 6 years ago
parent b0625dfd94
commit 5556a3bd7d
No known key found for this signature in database
GPG Key ID: 695714BD1BBC5F4C

1
.gitignore vendored

@ -1 +1,2 @@
/once_cell-0.1.8.crate
/once_cell-0.2.0.crate

@ -1,57 +0,0 @@
From 586a7e58b87d0f7418c798059c2e08e2e4bda26a Mon Sep 17 00:00:00 2001
From: Igor Gnatenko <i.gnatenko.brain@gmail.com>
Date: Mon, 6 May 2019 15:30:58 +0200
Subject: [PATCH] chore: Update parking_lot to 0.8
Signed-off-by: Igor Gnatenko <i.gnatenko.brain@gmail.com>
---
src/imp_pl.rs | 6 +++---
src/lib.rs | 2 +-
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/src/imp_pl.rs b/src/imp_pl.rs
index 8dbd853..c14ac4d 100644
--- a/src/imp_pl.rs
+++ b/src/imp_pl.rs
@@ -1,7 +1,7 @@
extern crate parking_lot;
use std::cell::UnsafeCell;
-use self::parking_lot::{Once, ONCE_INIT, OnceState};
+use self::parking_lot::{Once, OnceState};
/// A thread-safe cell which can be written to only once.
///
@@ -55,14 +55,14 @@ impl<T: PartialEq> PartialEq for OnceCell<T> {
impl<T> OnceCell<T> {
/// An empty cell, for initialization in a `const` context.
pub const INIT: OnceCell<T> = OnceCell {
- once: ONCE_INIT,
+ once: Once::new(),
value: UnsafeCell::new(None),
};
/// Creates a new empty cell.
pub fn new() -> OnceCell<T> {
OnceCell {
- once: ONCE_INIT,
+ once: Once::new(),
value: UnsafeCell::new(None),
}
}
diff --git a/src/lib.rs b/src/lib.rs
index 3aef107..a5625aa 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -160,7 +160,7 @@ unifies the APIs of those crates.
To implement a sync flavor of `OnceCell`, this crates uses either `::std::sync::Once` or
`::parking_lot::Once`. This is controlled by the `parking_lot` feature, which is enabled by default.
-When using `parking_lot`, the crate is compatible with rustc 1.25.0, without `parking_lot` a minimum
+When using `parking_lot`, the crate is compatible with rustc 1.31.0, without `parking_lot` a minimum
of `1.29.0` is required.
This crate uses unsafe.
--
2.21.0

@ -1,20 +0,0 @@
--- once_cell-0.1.8/Cargo.toml 1970-01-01T00:00:00+00:00
+++ once_cell-0.1.8/Cargo.toml 2019-05-07T05:37:53.908717+00:00
@@ -14,7 +14,7 @@
name = "once_cell"
version = "0.1.8"
authors = ["Aleksey Kladov <aleksey.kladov@gmail.com>"]
-exclude = ["*.png", "*.svg"]
+exclude = ["*.png", "*.svg", "/.travis.yml", "/Cargo.lock.min"]
description = "Single assignment cells and lazy static values without macros."
documentation = "https://docs.rs/once_cell"
readme = "README.md"
@@ -23,7 +23,7 @@
license = "MIT OR Apache-2.0"
repository = "https://github.com/matklad/once_cell"
[dependencies.parking_lot]
-version = "0.7.1"
+version = "0.8"
optional = true
default_features = false
[dev-dependencies.crossbeam-utils]

@ -5,20 +5,14 @@
%global crate once_cell
Name: rust-%{crate}
Version: 0.1.8
Release: 3%{?dist}
Version: 0.2.0
Release: 1%{?dist}
Summary: Single assignment cells and lazy static values without macros
# Upstream license specification: MIT OR Apache-2.0
License: MIT or ASL 2.0
URL: https://crates.io/crates/once_cell
Source: %{crates_source}
# Initial patched metadata
# * Exclude unnecessary files, https://github.com/matklad/once_cell/pull/12
# * Update parking_lot to 0.8, https://github.com/matklad/once_cell/pull/11
Patch0: once_cell-fix-metadata.diff
# Make it work with new parking_lot
Patch0001: 0001-chore-Update-parking_lot-to-0.8.patch
ExclusiveArch: %{rust_arches}
@ -87,6 +81,9 @@ which use "parking_lot" feature of "%{crate}" crate.
%endif
%changelog
* Tue May 07 14:42:19 CEST 2019 Igor Gnatenko <ignatenkobrain@fedoraproject.org> - 0.2.0-1
- Update to 0.2.0
* Tue May 07 07:37:55 CEST 2019 Igor Gnatenko <ignatenkobrain@fedoraproject.org> - 0.1.8-3
- Update parking_lot to 0.8

@ -1 +1 @@
SHA512 (once_cell-0.1.8.crate) = 068e1f74a2da7377d8b9e5d879e075276cd70dbd07814a6026beb013c556f393e73159ce4de8d8d6b1185676761d830a19e749b8e569aaeb59a87d77bcb0271c
SHA512 (once_cell-0.2.0.crate) = 1f4176932f0e5bc98c109690462755dfb4549d57b4f7f459c603ee924873967a8f1e0d2bd835ec3b0b6d40e5900e15b08975e8cac6e1045e5d5af2aabc0a7d7c

Loading…
Cancel
Save