mirror of
https://gitee.com/openharmony/third_party_rust_lazy-static.rs
synced 2025-02-17 06:37:41 +00:00
Added metadata
This commit is contained in:
parent
a0cf934b76
commit
68c4f2a95c
1
.gitignore
vendored
1
.gitignore
vendored
@ -1,3 +1,4 @@
|
||||
target
|
||||
doc
|
||||
Cargo.lock
|
||||
.cargo
|
||||
|
24
Cargo.toml
24
Cargo.toml
@ -1,9 +1,31 @@
|
||||
[package]
|
||||
|
||||
name = "lazy_static"
|
||||
version = "0.1.0"
|
||||
version = "0.1.1"
|
||||
authors = [ "loebel.marvin@gmail.com" ]
|
||||
|
||||
|
||||
# A short blurb about the package. This is not rendered in any format when
|
||||
# uploaded to crates.io (aka this is not markdown)
|
||||
description = "A macro for declaring lazily evaluated statics in Rust."
|
||||
|
||||
# These URLs point to more information about the repository
|
||||
documentation = "http://rust-ci.org/Kimundi/lazy-static.rs/doc/lazy_static/"
|
||||
repository = "https://github.com/Kimundi/lazy-static.rs"
|
||||
|
||||
# This points to a file in the repository (relative to this Cargo.toml). The
|
||||
# contents of this file are stored and indexed in the registry.
|
||||
readme = "README.md"
|
||||
|
||||
# This is a small list of keywords used to categorize and search for this
|
||||
# package.
|
||||
keywords = ["macro", "lazy", "static"]
|
||||
|
||||
# This is a string description of the license for this package. Currently
|
||||
# crates.io will validate the license provided against a whitelist of known
|
||||
# licenses. Multiple licenses can be separated with a `/`
|
||||
license = "MIT"
|
||||
|
||||
[lib]
|
||||
|
||||
name = "lazy_static"
|
||||
|
@ -60,7 +60,7 @@ fn times_two(n: uint) -> uint { n * 2 }
|
||||
|
||||
fn main() {
|
||||
println!("The map has {} entries.", *COUNT);
|
||||
println!("The entry for `0` is \"{}\".", HASHMAP.find(&0).unwrap());
|
||||
println!("The entry for `0` is \"{}\".", HASHMAP.get(&0).unwrap());
|
||||
println!("A expensive calculation on a static results in: {}.", *NUMBER);
|
||||
}
|
||||
```
|
||||
|
Loading…
x
Reference in New Issue
Block a user