Skip to content

Commit

Permalink
fix lints
Browse files Browse the repository at this point in the history
  • Loading branch information
wlqm committed Sep 26, 2024
1 parent 13fb42d commit e1cfcca
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 12 deletions.
4 changes: 1 addition & 3 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "ruc"
version = "6.0.0"
version = "6.0.1"
authors = ["[email protected]"]
edition = "2021"
description = "Rust Util Collections"
Expand All @@ -14,8 +14,6 @@ repository = "https://github.com/rust-util-collections/ruc.git"
features = ["full"]

[dependencies]
once_cell = "1.18"

sha3 = { version = "0.10.8", optional = true }

ed25519-zebra = { version = "4.0.0", optional = true }
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ test:

update:
rustup update stable
cargo update
cargo update --verbose

fmt:
cargo +nightly fmt
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
[![Rust](https://github.com/rust-util-collections/ruc/actions/workflows/rust.yml/badge.svg)](https://github.com/rust-util-collections/ruc/actions/workflows/rust.yml)
[![Latest Version](https://img.shields.io/crates/v/RUC.svg)](https://crates.io/crates/RUC)
[![Rust Documentation](https://img.shields.io/badge/api-rustdoc-blue.svg)](https://docs.rs/RUC)
![Minimum rustc version](https://img.shields.io/badge/rustc-1.78+-lightgray.svg)
![Minimum rustc version](https://img.shields.io/badge/rustc-1.81+-lightgray.svg)

# ruc

Expand Down
6 changes: 3 additions & 3 deletions src/crypto/sig/ed25519/readable/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,13 @@ use std::fmt;
pub use ed25519_zebra::SigningKey as RawSignKey;
pub use ed25519_zebra::VerificationKey as RawVerifyKey;

#[cfg_attr(feature = "SerDe", derive(serde::Deserialize, serde::Serialize))]
#[derive(serde::Deserialize, serde::Serialize)]
pub struct SignKey(String);

#[cfg_attr(feature = "SerDe", derive(serde::Deserialize, serde::Serialize))]
#[derive(serde::Deserialize, serde::Serialize)]
pub struct VerifyKey(String);

#[cfg_attr(feature = "SerDe", derive(serde::Deserialize, serde::Serialize))]
#[derive(serde::Deserialize, serde::Serialize)]
pub struct Sig(String);

// <signing key + verify key> in base64 format
Expand Down
6 changes: 2 additions & 4 deletions src/err/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -30,15 +30,13 @@ use core::{
fmt::{Debug, Display},
};

use std::{collections::HashSet, error::Error, sync::Mutex};

use once_cell::sync::Lazy;
use std::{collections::HashSet, error::Error, sync::LazyLock, sync::Mutex};

// avoid out-of-order printing
static LOG_LK: Mutex<()> = Mutex::new(());

/// `INFO` or `ERROR`, if mismatch, default to `INFO`
pub static LOG_LEVEL: Lazy<String> = Lazy::new(|| {
pub static LOG_LEVEL: LazyLock<String> = LazyLock::new(|| {
if let Ok(l) = std::env::var("RUC_LOG_LEVEL") {
if "ERROR" == l {
return "ERROR".to_owned();
Expand Down

0 comments on commit e1cfcca

Please sign in to comment.