mirror of
https://github.com/winapps-org/winapps.git
synced 2025-06-06 15:17:19 +02:00
Setup basic dependencies
This commit is contained in:
parent
2b294a678b
commit
8aff1aa9a1
6
.gitignore
vendored
Normal file
6
.gitignore
vendored
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
# Generated files
|
||||||
|
*/target/
|
||||||
|
|
||||||
|
# The library shouldn't decide about the exact versions of
|
||||||
|
# its dependencies, but let the downstream crate decide.
|
||||||
|
Cargo.lock
|
@ -6,3 +6,4 @@ edition = "2021"
|
|||||||
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
|
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
|
winapps = { path = "../winapps" }
|
||||||
|
@ -1,3 +1,5 @@
|
|||||||
|
use winapps;
|
||||||
|
|
||||||
fn main() {
|
fn main() {
|
||||||
println!("Hello, world!");
|
println!("Test lib: {}", winapps::add(1, 2));
|
||||||
}
|
}
|
||||||
|
@ -6,3 +6,4 @@ edition = "2021"
|
|||||||
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
|
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
|
winapps = { path = "../winapps" }
|
@ -1,3 +1,5 @@
|
|||||||
|
use winapps;
|
||||||
|
|
||||||
fn main() {
|
fn main() {
|
||||||
println!("Hello, world!");
|
println!("Test lib: {}", winapps::add(1, 2));
|
||||||
}
|
}
|
||||||
|
@ -1,14 +1,3 @@
|
|||||||
pub fn add(left: usize, right: usize) -> usize {
|
pub fn add(left: usize, right: usize) -> usize {
|
||||||
left + right
|
left + right
|
||||||
}
|
}
|
||||||
|
|
||||||
#[cfg(test)]
|
|
||||||
mod tests {
|
|
||||||
use super::*;
|
|
||||||
|
|
||||||
#[test]
|
|
||||||
fn it_works() {
|
|
||||||
let result = add(2, 2);
|
|
||||||
assert_eq!(result, 4);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user