Skip to content

Commit

Permalink
fix linux build
Browse files Browse the repository at this point in the history
  • Loading branch information
elliotcubit committed Jul 28, 2021
1 parent 4c0e5ae commit 358de12
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
2 changes: 1 addition & 1 deletion Cargo.lock

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

4 changes: 2 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "rc"
version = "0.1.2"
version = "0.1.3"
authors = ["Elliot Cubit <[email protected]>"]
description = "Text encoding swiss army knife"
edition = "2018"
Expand All @@ -9,4 +9,4 @@ edition = "2018"

[dependencies]
clap = "3.0.0-beta.2"
isatty = "0.1"
isatty = "0.1"
4 changes: 3 additions & 1 deletion src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ use codecs::error::Error;
use isatty::stdout_isatty;
use options::Format;
use std::ffi::OsString;
// Gives OsString the into_vec() method
use std::os::unix::ffi::OsStringExt;
use std::io;
use std::io::Read;
use std::process;
Expand All @@ -28,7 +30,7 @@ fn u8_arg(s: &OsString) -> Result<Vec<u8>, Error> {
// Linux can have anything in this string. We'll just return the bytes.
#[cfg(not(target_os = "windows"))]
fn u8_arg(s: &OsString) -> Result<Vec<u8>, Error> {
Ok(s.into_vec())
Ok(s.to_owned().into_vec())
}

fn main() {
Expand Down

0 comments on commit 358de12

Please sign in to comment.