1
Fork 0
mirror of https://github.com/RGBCube/uutils-coreutils synced 2025-08-05 15:37:47 +00:00

docs/build ~ polish descriptions and crate meta-information in Cargo.toml

This commit is contained in:
Roy Ivy III 2020-04-25 01:00:23 -05:00
parent ad30781c0c
commit 246e4427e4
3 changed files with 11 additions and 12 deletions

View file

@ -2,14 +2,14 @@
name = "uucore" name = "uucore"
version = "0.0.2" version = "0.0.2"
authors = ["uutils developers"] authors = ["uutils developers"]
description = "Common cross-platform code used by various uutils projects" license = "MIT"
description = "uutils ~ 'core' uutils code library (cross-platform)"
homepage = "https://github.com/uutils/uucore" homepage = "https://github.com/uutils/uucore"
repository = "https://github.com/uutils/uucore" repository = "https://github.com/uutils/uucore"
readme = "README.md" readme = "README.md"
keywords = ["cross-platform", "uutils", "coreutils"] keywords = ["cross-platform", "uutils", "coreutils"]
categories = ["os"] categories = ["os"]
license = "MIT"
[badges] [badges]
appveyor = { repository = "uutils/uucore" } appveyor = { repository = "uutils/uucore" }
@ -35,9 +35,9 @@ time = { version = "<= 0.1.42", optional = true }
## "problem" dependencies ## "problem" dependencies
# * backtrace: transitive dependency via 'failure'; pin to <= v0.3.30 to avoid increasing MinSRV to v1.33.0 # * backtrace: transitive dependency via 'failure'; pin to <= v0.3.30 to avoid increasing MinSRV to v1.33.0
backtrace = ">= 0.3.3, <= 0.3.30" backtrace = ">= 0.3.3, <= 0.3.30"
# * data-encoding: require 2.1, but 2.2.0 breaks the build for MinSRV 1.31.0 # * data-encoding: require v2.1; but v2.2.0 breaks the build for MinSRV v1.31.0
data-encoding = { version = "~2.1", optional = true } data-encoding = { version = "~2.1", optional = true }
# * libc: initial utmp support added in 0.2.15, but 0.2.68 break the build for MinSRV 1.31.0 # * libc: initial utmp support added in v0.2.15; but v0.2.68 breaks the build for MinSRV v1.31.0
libc = { version = "0.2.15, <= 0.2.66", optional = true } libc = { version = "0.2.15, <= 0.2.66", optional = true }
[target.'cfg(target_os = "redox")'.dependencies] [target.'cfg(target_os = "redox")'.dependencies]

View file

@ -3,7 +3,7 @@ name = "uucore_procs"
version = "0.0.2" version = "0.0.2"
authors = [] authors = []
license = "MIT" license = "MIT"
description = "`uucore` proc-macros for use by various uutils projects" description = "uutils ~ 'uucore' proc-macros"
[lib] [lib]
proc-macro = true proc-macro = true

View file

@ -47,17 +47,16 @@ pub fn main(stream: proc_macro::TokenStream) -> proc_macro::TokenStream {
let Tokens { expr } = syn::parse_macro_input!(stream as Tokens); let Tokens { expr } = syn::parse_macro_input!(stream as Tokens);
proc_dbg!(&expr); proc_dbg!(&expr);
const ARG_PANIC_TEXT: &str = "expected ident lexical path (or a literal string version) to 'uumain()' as argument"; const ARG_PANIC_TEXT: &str =
"expected ident lexical path (or a literal string version) to 'uumain()' as argument";
// match EXPR as a string literal or an ident path, o/w panic!() // match EXPR as a string literal or an ident path, o/w panic!()
let mut expr = match expr { let mut expr = match expr {
syn::Expr::Lit(expr_lit) => { syn::Expr::Lit(expr_lit) => match expr_lit.lit {
match expr_lit.lit { syn::Lit::Str(ref lit_str) => lit_str.parse::<syn::ExprPath>().unwrap(),
syn::Lit::Str(ref lit_str) => { lit_str.parse::<syn::ExprPath>().unwrap() },
_ => panic!(ARG_PANIC_TEXT), _ => panic!(ARG_PANIC_TEXT),
}
}, },
syn::Expr::Path(expr_path) => { expr_path }, syn::Expr::Path(expr_path) => expr_path,
_ => panic!(ARG_PANIC_TEXT), _ => panic!(ARG_PANIC_TEXT),
}; };
proc_dbg!(&expr); proc_dbg!(&expr);