Skip to content

armgit / zed

Public Imported from GitHub
0

Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.

add zed-actions crate

Piotr Osiewicz4b87ce8952a2
diff --git a/Cargo.lock b/Cargo.lock
index 9bf504bc15c..13d194440cf 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -8909,6 +8909,13 @@ dependencies = [
"workspace",
]
+[[package]]
+name = "zed-actions"
+version = "0.1.0"
+dependencies = [
+ "gpui",
+]
+
[[package]]
name = "zeroize"
version = "1.3.0"
diff --git a/Cargo.toml b/Cargo.toml
index fca73559648..34533da51cd 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -67,6 +67,7 @@ members = [
"crates/workspace",
"crates/welcome",
"crates/zed",
+ "crates/zed-actions"
]
default-members = ["crates/zed"]
resolver = "2"
diff --git a/crates/zed-actions/Cargo.toml b/crates/zed-actions/Cargo.toml
new file mode 100644
index 00000000000..c6868b1546f
--- /dev/null
+++ b/crates/zed-actions/Cargo.toml
@@ -0,0 +1,9 @@
+[package]
+name = "zed-actions"
+version = "0.1.0"
+edition = "2021"
+
+# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
+
+[dependencies]
+gpui = { path = "../gpui" }
diff --git a/crates/zed-actions/src/lib.rs b/crates/zed-actions/src/lib.rs
new file mode 100644
index 00000000000..7d12d9af819
--- /dev/null
+++ b/crates/zed-actions/src/lib.rs
@@ -0,0 +1,14 @@
+pub fn add(left: usize, right: usize) -> usize {
+ left + right
+}
+
+#[cfg(test)]
+mod tests {
+ use super::*;
+
+ #[test]
+ fn it_works() {
+ let result = add(2, 2);
+ assert_eq!(result, 4);
+ }
+}