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:
parent
ad30781c0c
commit
246e4427e4
3 changed files with 11 additions and 12 deletions
|
@ -2,14 +2,14 @@
|
|||
name = "uucore"
|
||||
version = "0.0.2"
|
||||
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"
|
||||
repository = "https://github.com/uutils/uucore"
|
||||
readme = "README.md"
|
||||
keywords = ["cross-platform", "uutils", "coreutils"]
|
||||
categories = ["os"]
|
||||
license = "MIT"
|
||||
|
||||
[badges]
|
||||
appveyor = { repository = "uutils/uucore" }
|
||||
|
@ -35,9 +35,9 @@ time = { version = "<= 0.1.42", optional = true }
|
|||
## "problem" dependencies
|
||||
# * 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"
|
||||
# * 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 }
|
||||
# * 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 }
|
||||
|
||||
[target.'cfg(target_os = "redox")'.dependencies]
|
||||
|
|
|
@ -3,7 +3,7 @@ name = "uucore_procs"
|
|||
version = "0.0.2"
|
||||
authors = []
|
||||
license = "MIT"
|
||||
description = "`uucore` proc-macros for use by various uutils projects"
|
||||
description = "uutils ~ 'uucore' proc-macros"
|
||||
|
||||
[lib]
|
||||
proc-macro = true
|
||||
|
|
|
@ -47,17 +47,16 @@ pub fn main(stream: proc_macro::TokenStream) -> proc_macro::TokenStream {
|
|||
let Tokens { expr } = syn::parse_macro_input!(stream as Tokens);
|
||||
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!()
|
||||
let mut expr = match expr {
|
||||
syn::Expr::Lit(expr_lit) => {
|
||||
match expr_lit.lit {
|
||||
syn::Lit::Str(ref lit_str) => { lit_str.parse::<syn::ExprPath>().unwrap() },
|
||||
_ => panic!(ARG_PANIC_TEXT),
|
||||
}
|
||||
syn::Expr::Lit(expr_lit) => match expr_lit.lit {
|
||||
syn::Lit::Str(ref lit_str) => lit_str.parse::<syn::ExprPath>().unwrap(),
|
||||
_ => panic!(ARG_PANIC_TEXT),
|
||||
},
|
||||
syn::Expr::Path(expr_path) => { expr_path },
|
||||
syn::Expr::Path(expr_path) => expr_path,
|
||||
_ => panic!(ARG_PANIC_TEXT),
|
||||
};
|
||||
proc_dbg!(&expr);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue