misc

Unnamed repository; edit this file 'description' to name the repository.
git clone git://git.alexwennerberg.com/misc
Log | Files | Refs | README | LICENSE

commit ee216c00ec2e1dc1ff806e3bfab470e4ca00e459
parent 61b42c929d8c501293581456fcb10440d20a88f8
Author: alex wennerberg <alex@alexwennerberg.com>
Date:   Fri, 24 Dec 2021 02:07:36 -0800

finger

Diffstat:
Mfinger.rs | 6+-----
1 file changed, 1 insertion(+), 5 deletions(-)

diff --git a/finger.rs b/finger.rs @@ -37,10 +37,6 @@ fn get_params(query: &str) -> (&str, &str) { user = ""; } else { user = params[0]; - if params.len() > 2 || !user.chars().all(|c| c.is_ascii()) { - println!("Username must be ascii and not include @"); - process::exit(1); - } host = params[1]; } return (host, user); @@ -73,7 +69,7 @@ fn main() -> std::io::Result<()> { // TODO -- filter out nonprintable stream.read_to_end(&mut line)?; - // Assume UTF-8 input, against the spec, which predates UTF8 + // Assume UTF-8 input, against the spec, which predates UTF-8 println!("{}", str::from_utf8(&line).unwrap()); Ok(()) }