Skip to content

Commit 9a8eb99

Browse files
committed
Comment rc and drop parking_lot
1 parent 35a673a commit 9a8eb99

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

netcdf/Cargo.toml

-1
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,6 @@ netcdf-derive = { workspace = true, optional = true }
3030
bitflags = "2.4.2"
3131
libc = "0.2.155"
3232
mpi-sys = { workspace = true, optional = true }
33-
parking_lot = "0.12.3"
3433

3534
[dev-dependencies]
3635
clap = { version = "4.5.1", features = ["derive"] }

netcdf/src/rc.rs

+4
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
1+
//! Set and get configuration variables
12
use std::ffi::{c_char, CStr, CString};
23
use std::ops::Deref;
34
use std::ptr::NonNull;
45

6+
/// Set a key
57
pub fn set(key: &str, value: &str) -> crate::error::Result<()> {
68
let key = CString::new(key)?;
79
let value = CString::new(value)?;
@@ -11,6 +13,7 @@ pub fn set(key: &str, value: &str) -> crate::error::Result<()> {
1113
}
1214

1315
#[derive(Debug)]
16+
/// String with custom Drop implementations
1417
pub struct OwnedString {
1518
inner: NonNull<c_char>,
1619
}
@@ -30,6 +33,7 @@ impl Drop for OwnedString {
3033
}
3134
}
3235

36+
/// Get a key
3337
pub fn get(key: &str) -> Option<OwnedString> {
3438
let key = if let Ok(key) = CString::new(key) {
3539
key

0 commit comments

Comments
 (0)