fix: cfg unix forbidden in rust .82
Install.sh / build (push) Waiting to run
Linux / build (push) Waiting to run
MacOS / build (push) Waiting to run
Windows / build (push) Waiting to run

This commit is contained in:
veeso
2024-10-21 10:32:50 +02:00
parent 11559d0962
commit 69f821baef
22 changed files with 95 additions and 95 deletions
@@ -16,7 +16,7 @@ use tuirealm::props::{
Alignment, BorderSides, BorderType, Borders, Color, InputType, Style, TableBuilder, TextSpan,
};
use tuirealm::{Component, Event, MockComponent, NoUserEvent, State, StateValue};
#[cfg(unix)]
#[cfg(posix)]
use uzers::{get_group_by_gid, get_user_by_uid};
pub use self::chmod::ChmodPopup;
@@ -533,7 +533,7 @@ impl FileInfoPopup {
.add_col(TextSpan::from("Last access time: "))
.add_col(TextSpan::new(atime.as_str()).fg(Color::LightRed));
// User
#[cfg(unix)]
#[cfg(posix)]
let username: String = match file.metadata().uid {
Some(uid) => match get_user_by_uid(uid) {
Some(user) => user.name().to_string_lossy().to_string(),
@@ -544,7 +544,7 @@ impl FileInfoPopup {
#[cfg(windows)]
let username: String = format!("{}", file.metadata().uid.unwrap_or(0));
// Group
#[cfg(unix)]
#[cfg(posix)]
let group: String = match file.metadata().gid {
Some(gid) => match get_group_by_gid(gid) {
Some(group) => group.name().to_string_lossy().to_string(),
@@ -365,7 +365,7 @@ mod test {
}
#[test]
#[cfg(unix)]
#[cfg(posix)]
fn test_should_suggest_absolute_path() {
let mut states = OwnStates {
files: vec![
+2 -2
View File
@@ -494,9 +494,9 @@ impl FileTransferActivity {
}
UiMsg::ShowChmodPopup => {
let selected_file = match self.browser.tab() {
#[cfg(unix)]
#[cfg(posix)]
FileExplorerTab::HostBridge => self.get_local_selected_entries(),
#[cfg(unix)]
#[cfg(posix)]
FileExplorerTab::FindHostBridge => self.get_found_selected_entries(),
FileExplorerTab::Remote => self.get_remote_selected_entries(),
FileExplorerTab::FindRemote => self.get_found_selected_entries(),