Rebuilt for rust-users 0.9.1
Signed-off-by: Robert-André Mauchin <zebob.m@gmail.com>
This commit is contained in:
parent
4a44a5786c
commit
6638e649ab
|
@ -0,0 +1,46 @@
|
|||
From 058b4a57bdb1e25cbdacc0fbd1eefc09bc5f1e95 Mon Sep 17 00:00:00 2001
|
||||
From: Benjamin Sago <ogham@bsago.me>
|
||||
Date: Fri, 7 Dec 2018 00:59:05 +0000
|
||||
Subject: [PATCH] Bump users crate version
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
And remove an unnecessary allocation while we’re at it. Fixes #442
|
||||
---
|
||||
src/output/render/groups.rs | 4 ++--
|
||||
src/output/render/users.rs | 2 +-
|
||||
4 files changed, 7 insertions(+), 7 deletions(-)
|
||||
|
||||
diff --git a/src/output/render/groups.rs b/src/output/render/groups.rs
|
||||
index 6504e889..a3a25e70 100644
|
||||
--- a/src/output/render/groups.rs
|
||||
+++ b/src/output/render/groups.rs
|
||||
@@ -19,12 +19,12 @@ impl f::Group {
|
||||
let current_uid = users.get_current_uid();
|
||||
if let Some(current_user) = users.get_user_by_uid(current_uid) {
|
||||
if current_user.primary_group_id() == group.gid()
|
||||
- || group.members().contains(¤t_user.name().to_owned()) {
|
||||
+ || group.members().iter().any(|u| u == current_user.name()) {
|
||||
style = colours.yours();
|
||||
}
|
||||
}
|
||||
|
||||
- TextCell::paint(style, group.name().to_owned())
|
||||
+ TextCell::paint(style, group.name().to_string_lossy().into())
|
||||
}
|
||||
}
|
||||
|
||||
diff --git a/src/output/render/users.rs b/src/output/render/users.rs
|
||||
index 75ff4c6f..d7edefac 100644
|
||||
--- a/src/output/render/users.rs
|
||||
+++ b/src/output/render/users.rs
|
||||
@@ -9,7 +9,7 @@ use output::cell::TextCell;
|
||||
impl f::User {
|
||||
pub fn render<C: Colours, U: Users>(&self, colours: &C, users: &U) -> TextCell {
|
||||
let user_name = match users.get_user_by_uid(self.0) {
|
||||
- Some(user) => user.name().to_owned(),
|
||||
+ Some(user) => user.name().to_string_lossy().into(),
|
||||
None => self.0.to_string(),
|
||||
};
|
||||
|
|
@ -28,7 +28,7 @@
|
|||
|
||||
[dependencies.users]
|
||||
-version = "0.5.2"
|
||||
+version = "0.7"
|
||||
+version = "0.9"
|
||||
|
||||
[dependencies.term_size]
|
||||
version = "0.3.0"
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
|
||||
Name: rust-%{crate}
|
||||
Version: 0.8.0
|
||||
Release: 13%{?dist}
|
||||
Release: 14%{?dist}
|
||||
Summary: Modern replacement for ls
|
||||
|
||||
License: MIT
|
||||
|
@ -17,7 +17,7 @@ Source: %{crates_source}
|
|||
# * Bump ansi_term to 0.11, remove getopts, https://github.com/ogham/exa/commit/4c3fd5483d2eff2ea1e623878ede54eaa396e09e
|
||||
# * Bump env_logger to 0.6, https://github.com/ogham/exa/pull/315
|
||||
# https://github.com/ogham/exa/pull/469
|
||||
# * Bump users to 0.6, https://github.com/ogham/exa/pull/395
|
||||
# * Bump users to 0.9, https://github.com/ogham/exa/pull/495
|
||||
# * Bump lazy_static, https://github.com/ogham/exa/pull/322
|
||||
# * Bump git2 to 0.8, https://github.com/ogham/exa/commit/f757300718b1861852d4a33459385eaf921d69e7
|
||||
# https://github.com/ogham/exa/pull/461
|
||||
|
@ -26,6 +26,8 @@ Patch0: exa-fix-metadata.diff
|
|||
Patch1: 0001-Upgrade-libgit2.patch
|
||||
# Make it work with new env_logger
|
||||
Patch2: 0001-Update-log-to-0.4-and-env_logger-to-0.5.patch
|
||||
# Make it work with new users
|
||||
Patch3: 0001-Bump-users-crate-version.patch
|
||||
|
||||
ExclusiveArch: %{rust_arches}
|
||||
|
||||
|
@ -46,7 +48,7 @@ BuildRequires: (crate(scoped_threadpool/default) >= 0.1.0 with crate(scoped_thr
|
|||
BuildRequires: (crate(term_grid/default) >= 0.1.6 with crate(term_grid/default) < 0.2.0)
|
||||
BuildRequires: (crate(term_size/default) >= 0.3.0 with crate(term_size/default) < 0.4.0)
|
||||
BuildRequires: (crate(unicode-width/default) >= 0.1.4 with crate(unicode-width/default) < 0.2.0)
|
||||
BuildRequires: (crate(users/default) >= 0.7.0 with crate(users/default) < 0.8.0)
|
||||
BuildRequires: (crate(users/default) >= 0.9.0 with crate(users/default) < 0.10.0)
|
||||
BuildRequires: (crate(zoneinfo_compiled/default) >= 0.4.5 with crate(zoneinfo_compiled/default) < 0.5.0)
|
||||
|
||||
%global _description \
|
||||
|
@ -99,6 +101,9 @@ Summary: %{summary}
|
|||
%endif
|
||||
|
||||
%changelog
|
||||
* Thu Apr 25 17:20:22 CET 2019 Robert-André Mauchin <zebob.m@gmail.com> - 0.8.0-214
|
||||
- Rebuilt for rust-users 0.9.1
|
||||
|
||||
* Sun Feb 10 2019 Igor Gnatenko <ignatenkobrain@fedoraproject.org> - 0.8.0-13
|
||||
- Update git2 and env_logger deps
|
||||
|
||||
|
|
Loading…
Reference in New Issue