mirror of
https://github.com/RGBCube/uutils-coreutils
synced 2025-07-28 11:37:44 +00:00
who: limit the parts of split host to 2
This commit is contained in:
parent
34d2224098
commit
fb53c019b4
1 changed files with 1 additions and 1 deletions
|
@ -441,7 +441,7 @@ impl Who {
|
||||||
|
|
||||||
let mut buf = vec![];
|
let mut buf = vec![];
|
||||||
let ut_host = ut.host();
|
let ut_host = ut.host();
|
||||||
let mut res = ut_host.split(':');
|
let mut res = ut_host.splitn(2, ':');
|
||||||
if let Some(h) = res.next() {
|
if let Some(h) = res.next() {
|
||||||
if self.do_lookup {
|
if self.do_lookup {
|
||||||
buf.push(ut.canon_host().unwrap_or(h.to_owned()));
|
buf.push(ut.canon_host().unwrap_or(h.to_owned()));
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue