Skip to content

Commit

Permalink
Merge pull request #44 from statiolake/use-std-oncelock
Browse files Browse the repository at this point in the history
Use std::sync::OnceLock
  • Loading branch information
statiolake authored Jun 22, 2023
2 parents 020647b + 6df9e56 commit 480f93c
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 11 deletions.
12 changes: 6 additions & 6 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ jobs:
fail-fast: false
matrix:
channel:
- 1.67.1
- 1.70.0
- stable
- beta
target_triple:
Expand All @@ -42,23 +42,23 @@ jobs:
- x86_64-unknown-linux-gnu
- x86_64-unknown-linux-musl
include:
- channel: 1.67.1
- channel: 1.70.0
target_triple: x86_64-pc-windows-msvc
host_triple: x86_64-pc-windows-msvc
os: windows-latest
- channel: 1.67.1
- channel: 1.70.0
target_triple: x86_64-pc-windows-gnu
host_triple: x86_64-pc-windows-gnu
os: windows-latest
- channel: 1.67.1
- channel: 1.70.0
target_triple: x86_64-apple-darwin
host_triple: x86_64-apple-darwin
os: macOS-latest
- channel: 1.67.1
- channel: 1.70.0
target_triple: x86_64-unknown-linux-gnu
host_triple: x86_64-unknown-linux-gnu
os: ubuntu-20.04
- channel: 1.67.1
- channel: 1.70.0
target_triple: x86_64-unknown-linux-musl
host_triple: x86_64-unknown-linux-gnu
os: ubuntu-20.04
Expand Down
4 changes: 1 addition & 3 deletions proconio/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name = "proconio"
version = "0.4.4"
authors = ["statiolake <statiolake@gmail.com>"]
edition = "2018"
rust-version = "1.67.1"
rust-version = "1.70.0"
repository = "https://github.com/statiolake/proconio-rs"
keywords = ["io", "procon", "procon"]
categories = ["command-line-interface"]
Expand Down Expand Up @@ -45,8 +45,6 @@ required-features = ["derive"]
harness = false

[dependencies]
# 1.15.0 uses Rust 2021 edition; does not compile on Rust 1.42.
once_cell = "=1.14.0"

[dependencies.proconio-derive]
version = "0.2.0"
Expand Down
4 changes: 2 additions & 2 deletions proconio/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -513,8 +513,8 @@ pub mod marker;
pub mod source;

use crate::source::{auto::AutoSource, line::LineSource};
use once_cell::sync::OnceCell;
use std::io::{BufReader, Stdin};
use std::sync::OnceLock;
use std::{
io::{self, BufRead},
sync::Mutex,
Expand Down Expand Up @@ -549,7 +549,7 @@ impl<R: BufRead> source::Source<R> for StdinSource<R> {
}

#[doc(hidden)]
pub static STDIN_SOURCE: OnceCell<Mutex<StdinSource<BufReader<Stdin>>>> = OnceCell::new();
pub static STDIN_SOURCE: OnceLock<Mutex<StdinSource<BufReader<Stdin>>>> = OnceLock::new();

/// read input from stdin.
///
Expand Down

0 comments on commit 480f93c

Please sign in to comment.