Skip to content

Commit

Permalink
fix: send + sync
Browse files Browse the repository at this point in the history
  • Loading branch information
veeso committed Oct 25, 2024
1 parent 68e2899 commit 9ba16de
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 6 deletions.
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,20 @@
# Changelog

- [Changelog](#changelog)
- [0.1.4](#014)
- [0.1.3](#013)
- [0.1.2](#012)
- [0.1.1](#011)
- [0.1.0](#010)

---

## 0.1.4

Released on 25/10/2024

- made remotefs-memory `sync` + `send`

## 0.1.3

Released on 25/10/2024
Expand Down
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "remotefs-memory"
version = "0.1.3"
version = "0.1.4"
authors = ["Christian Visintin <[email protected]>"]
edition = "2021"
license = "MIT"
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<p align="center">~ A remotefs implementation for testing and simulation ~</p>

<p align="center">Developed by <a href="https://veeso.github.io/" target="_blank">@veeso</a></p>
<p align="center">Current version: 0.1.3</p>
<p align="center">Current version: 0.1.4</p>

<p align="center">
<a href="https://opensource.org/licenses/MIT"
Expand Down
8 changes: 4 additions & 4 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -85,9 +85,9 @@ pub struct MemoryFs {
wrkdir: PathBuf,
connected: bool,
// Fn to get uid
get_uid: Box<dyn Fn() -> u32>,
get_uid: Box<dyn Fn() -> u32 + Send + Sync>,
// Fn to get gid
get_gid: Box<dyn Fn() -> u32>,
get_gid: Box<dyn Fn() -> u32 + Send + Sync>,
}

#[derive(Debug, Clone)]
Expand Down Expand Up @@ -128,7 +128,7 @@ impl MemoryFs {
/// Set the function to get the user id (uid).
pub fn with_get_uid<F>(mut self, get_uid: F) -> Self
where
F: Fn() -> u32 + 'static,
F: Fn() -> u32 + Send + Sync + 'static,
{
self.get_uid = Box::new(get_uid);
self
Expand All @@ -137,7 +137,7 @@ impl MemoryFs {
/// Set the function to get the group id (gid).
pub fn with_get_gid<F>(mut self, get_gid: F) -> Self
where
F: Fn() -> u32 + 'static,
F: Fn() -> u32 + Send + Sync + 'static,
{
self.get_gid = Box::new(get_gid);
self
Expand Down

0 comments on commit 9ba16de

Please sign in to comment.