jazzdotdev / jazz

The Scripting Engine that Combines Speed, Safety, and Simplicity
Apache License 2.0
147 stars 11 forks source link

Diff null sources #256

Closed hedgar2017 closed 5 years ago

hedgar2017 commented 5 years ago

Resolves the issue

dariusc93 commented 5 years ago

What you should do to reduce repeated code is to put

#[cfg(target_os = "windows")]
const NULL_SOURCE: &str = "nul";
#[cfg(target_os = "linux")]
const NULL_SOURCE: &str = "/dev/null";

in text/mod.rs then do use crate::bindings::text::NULL_SOURCE in any code, or maybe put them in one of the crates this crate uses (eg patch?) and include it. Same with PR #258 and maybe #255 ?

hedgar2017 commented 5 years ago

Merged with PR #258