aboutsummaryrefslogtreecommitdiff
path: root/examples/with-3rd-party/third-party-lib/src
diff options
context:
space:
mode:
authorHampusM <hampus@hampusmat.com>2022-08-20 17:10:08 +0200
committerHampusM <hampus@hampusmat.com>2022-08-21 18:17:50 +0200
commitade21185976ea2324d313a5c28a88cc0492f2934 (patch)
treef217d55ad324160d8a9a099c562c8bc6cbb60c1f /examples/with-3rd-party/third-party-lib/src
parentb31422d48a600ccccb682567f5eb11fc0bca547c (diff)
docs: add a example that uses a 3rd party library
Diffstat (limited to 'examples/with-3rd-party/third-party-lib/src')
-rw-r--r--examples/with-3rd-party/third-party-lib/src/lib.rs23
1 files changed, 23 insertions, 0 deletions
diff --git a/examples/with-3rd-party/third-party-lib/src/lib.rs b/examples/with-3rd-party/third-party-lib/src/lib.rs
new file mode 100644
index 0000000..f3b3ed3
--- /dev/null
+++ b/examples/with-3rd-party/third-party-lib/src/lib.rs
@@ -0,0 +1,23 @@
+pub trait IShuriken
+{
+ fn throw(&self);
+}
+
+pub struct Shuriken {}
+
+impl Shuriken
+{
+ #[allow(clippy::new_without_default)]
+ pub fn new() -> Self
+ {
+ Self {}
+ }
+}
+
+impl IShuriken for Shuriken
+{
+ fn throw(&self)
+ {
+ println!("Threw shuriken!");
+ }
+}