Skip to content

Commit

Permalink
v3.0.0
Browse files Browse the repository at this point in the history
Signed-off-by: Alex Saveau <[email protected]>
  • Loading branch information
SUPERCILEX committed Feb 15, 2025
1 parent 2e4a870 commit 600eac4
Show file tree
Hide file tree
Showing 9 changed files with 21 additions and 15 deletions.
7 changes: 4 additions & 3 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,12 @@ members = [
]

[workspace.package]
version = "1.1.6"
version = "3.0.0"
authors = ["Alex Saveau <[email protected]>"]
edition = "2024"
repository = "https://github.com/SUPERCILEX/fuc"
license = "Apache-2.0"
rust-version = "1.85"

[package]
name = "lint"
Expand Down
3 changes: 2 additions & 1 deletion cpz/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,12 @@ repository.workspace = true
keywords = ["tools", "files", "cp"]
categories = ["command-line-utilities", "development-tools", "filesystem"]
license.workspace = true
rust-version.workspace = true

[dependencies]
clap = { version = "4.5.29", features = ["derive", "wrap_help"] }
error-stack = { version = "0.5.0", default-features = false, features = ["std"] }
fuc_engine = { version = "1", path = "../fuc_engine" }
fuc_engine = { version = "3", path = "../fuc_engine" }
indicatif = { version = "0.17.11", optional = true }
thiserror = "2.0.11"
tracing = { version = "0.1.41", optional = true }
Expand Down
8 changes: 4 additions & 4 deletions cpz/src/main.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
#![feature(let_chains)]

use std::{
cell::LazyCell,
fs,
Expand Down Expand Up @@ -264,8 +262,10 @@ fn copy(
let to = {
let is_into_directory = *is_into_directory;
let mut to = to;
if is_into_directory && let Some(name) = from.file_name() {
to.push(name);
if is_into_directory {
if let Some(name) = from.file_name() {
to.push(name);
}
}
to
};
Expand Down
2 changes: 2 additions & 0 deletions fuc_engine/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,11 @@ repository.workspace = true
keywords = ["tools", "files"]
categories = ["filesystem"]
license.workspace = true
rust-version.workspace = true

[dependencies]
bon = "3.3.2"
once_cell = "1.20.3"
crossbeam-channel = "0.5.14"
thiserror = "2.0.11"
tracing = { version = "0.1.41", default-features = false, features = ["attributes"], optional = true }
Expand Down
1 change: 0 additions & 1 deletion fuc_engine/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
#![feature(lazy_cell_into_inner)]
#![allow(clippy::needless_pass_by_value)]

use std::{borrow::Cow, io, path::PathBuf};
Expand Down
5 changes: 3 additions & 2 deletions fuc_engine/src/ops/copy.rs
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ fn schedule_copies<
mod compat {
use std::{
borrow::Cow,
cell::{Cell, LazyCell},
cell::Cell,
env,
ffi::{CStr, CString},
fmt::{Debug, Formatter},
Expand All @@ -150,6 +150,7 @@ mod compat {
};

use crossbeam_channel::{Receiver, Sender};
use once_cell::sync::Lazy as LazyCell;
use rustix::{
fs::{
AtFlags, CWD, FileType, Mode, OFlags, RawDir, StatxFlags, copy_file_range, mkdirat,
Expand Down Expand Up @@ -201,7 +202,7 @@ mod compat {
fn finish(self) -> Result<(), Error> {
let Self { scheduling } = self;

if let Ok((tasks, thread)) = LazyCell::into_inner(scheduling) {
if let Ok((tasks, thread)) = LazyCell::into_value(scheduling) {
drop(tasks);
thread.join().map_err(|_| Error::Join)??;
}
Expand Down
4 changes: 2 additions & 2 deletions fuc_engine/src/ops/remove.rs
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,6 @@ fn schedule_deletions<'a, I: Into<Cow<'a, Path>>, F: IntoIterator<Item = I>>(
mod compat {
use std::{
borrow::Cow,
cell::LazyCell,
env,
env::{current_dir, set_current_dir},
ffi::{CStr, CString, OsStr},
Expand All @@ -135,6 +134,7 @@ mod compat {
};

use crossbeam_channel::{Receiver, Sender};
use once_cell::sync::Lazy as LazyCell;
use rustix::{
fs::{AtFlags, CWD, FileType, Mode, OFlags, RawDir, openat, unlinkat},
io::Errno,
Expand Down Expand Up @@ -180,7 +180,7 @@ mod compat {
fn finish(self) -> Result<(), Error> {
let Self { scheduling } = self;

if let Ok((tasks, thread)) = LazyCell::into_inner(scheduling) {
if let Ok((tasks, thread)) = LazyCell::into_value(scheduling) {
drop(tasks);
thread.join().map_err(|_| Error::Join)??;
}
Expand Down
3 changes: 2 additions & 1 deletion rmz/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,12 @@ repository.workspace = true
keywords = ["tools", "files", "rm"]
categories = ["command-line-utilities", "development-tools", "filesystem"]
license.workspace = true
rust-version.workspace = true

[dependencies]
clap = { version = "4.5.29", features = ["derive", "wrap_help"] }
error-stack = { version = "0.5.0", default-features = false, features = ["std"] }
fuc_engine = { version = "1", path = "../fuc_engine" }
fuc_engine = { version = "3", path = "../fuc_engine" }
indicatif = { version = "0.17.11", optional = true }
thiserror = "2.0.11"
tracing = { version = "0.1.41", optional = true }
Expand Down

0 comments on commit 600eac4

Please sign in to comment.