summaryrefslogtreecommitdiff
path: root/ex4_3
diff options
context:
space:
mode:
authorBrad Clawsie <brad@b7j0c.org>2026-11-03 10:01:02 -0600
committerBrad Clawsie <brad@b7j0c.org>2026-11-03 10:01:02 -0600
commit61f10783d8a5aa3a9bc8b4df187c19b713ef1a62 (patch)
treef28546e4cda15ca58197c4c912087ba5e3129a39 /ex4_3
parenta82dc6e21a8d15eef6075f6e0f64140049c4870d (diff)
feat: ex4_3
commit 044d4b3d618cd97bff3e83e769c089382d1fdce5 Author: Brad Clawsie <brad@b7j0c.org> Date: Tue Nov 3 10:00:33 2026 -0600 feat: ex4_3
Diffstat (limited to 'ex4_3')
-rw-r--r--ex4_3/Cargo.lock7
-rw-r--r--ex4_3/Cargo.toml6
-rw-r--r--ex4_3/src/main.rs34
3 files changed, 47 insertions, 0 deletions
diff --git a/ex4_3/Cargo.lock b/ex4_3/Cargo.lock
new file mode 100644
index 0000000..4a32058
--- /dev/null
+++ b/ex4_3/Cargo.lock
@@ -0,0 +1,7 @@
+# This file is automatically @generated by Cargo.
+# It is not intended for manual editing.
+version = 4
+
+[[package]]
+name = "ex4_3"
+version = "0.1.0"
diff --git a/ex4_3/Cargo.toml b/ex4_3/Cargo.toml
new file mode 100644
index 0000000..2ad5716
--- /dev/null
+++ b/ex4_3/Cargo.toml
@@ -0,0 +1,6 @@
+[package]
+name = "ex4_3"
+version = "0.1.0"
+edition = "2024"
+
+[dependencies]
diff --git a/ex4_3/src/main.rs b/ex4_3/src/main.rs
new file mode 100644
index 0000000..158c1b3
--- /dev/null
+++ b/ex4_3/src/main.rs
@@ -0,0 +1,34 @@
+use std::cmp::PartialEq;
+
+struct Ticket {
+ title: String,
+ description: String,
+ status: String,
+}
+
+impl PartialEq for Ticket {
+ fn eq(&self, other: &Self) -> bool {
+ self.title == other.title &&
+ self.description == other.description &&
+ self.status == other.status
+ }
+}
+
+fn main() {
+ println!("Hello, world!");
+}
+
+#[cfg(test)]
+mod tests {
+ use crate::*;
+
+ #[test]
+ fn t0() {
+ let t = Ticket{
+ title: String::from("t"),
+ description: String::from("d"),
+ status: String::from("s"),
+ };
+ assert_eq!(t == t, true);
+ }
+}