You've already forked rust-workspace
Switch from vscode to zed and add crates folder
This commit is contained in:
@@ -0,0 +1,17 @@
|
||||
[package]
|
||||
name = "rust"
|
||||
version = "0.0.0"
|
||||
license-file.workspace = true
|
||||
|
||||
edition.workspace = true
|
||||
rust-version.workspace = true
|
||||
|
||||
[package.metadata.docs.rs]
|
||||
all-features = true
|
||||
rustdoc-args = ["--cfg", "docsrs"]
|
||||
|
||||
[dependencies]
|
||||
# crate = { workspace = true }
|
||||
|
||||
[lints]
|
||||
workspace = true
|
||||
@@ -0,0 +1,20 @@
|
||||
//! Module
|
||||
|
||||
#![cfg_attr(docsrs, feature(doc_cfg))]
|
||||
// #[cfg_attr(docsrs, doc(cfg(feature = "std")))]
|
||||
|
||||
/// Add function
|
||||
pub fn add(left: usize, right: usize) -> usize {
|
||||
left.wrapping_add(right)
|
||||
}
|
||||
|
||||
#[cfg(test)]
|
||||
mod tests {
|
||||
use super::*;
|
||||
|
||||
#[test]
|
||||
fn it_works() {
|
||||
let result = add(2, 2);
|
||||
assert_eq!(result, 4);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user