From 5e5400ba5a71a5c039eca682f0acbf90cad4dfc5 Mon Sep 17 00:00:00 2001 From: id3v1669 Date: Sat, 6 Apr 2024 19:45:17 +0800 Subject: [PATCH 1/3] fixes for 'cargo test' & bump flake.lock due to outdated cargo --- flake.lock | 6 +++--- libwayshot/src/lib.rs | 4 +++- libwayshot/src/region.rs | 2 +- 3 files changed, 7 insertions(+), 5 deletions(-) diff --git a/flake.lock b/flake.lock index 3fdf883f..c604231d 100644 --- a/flake.lock +++ b/flake.lock @@ -2,11 +2,11 @@ "nodes": { "nixpkgs": { "locked": { - "lastModified": 1688221086, - "narHash": "sha256-cdW6qUL71cNWhHCpMPOJjlw0wzSRP0pVlRn2vqX/VVg=", + "lastModified": 1712222121, + "narHash": "sha256-8f3glF4uwsPlDvaKDRgXD9xGe4YoCH4jA8ICxy/NbCo=", "owner": "nixos", "repo": "nixpkgs", - "rev": "cd99c2b3c9f160cd004318e0697f90bbd5960825", + "rev": "23ff7d9dc4f3d553939e7bfe0d2667198f993536", "type": "github" }, "original": { diff --git a/libwayshot/src/lib.rs b/libwayshot/src/lib.rs index 4e8bc98b..2dfe80b3 100644 --- a/libwayshot/src/lib.rs +++ b/libwayshot/src/lib.rs @@ -66,7 +66,9 @@ pub mod reexport { /// Struct to store wayland connection and globals list. /// # Example usage /// -/// ``` +/// ```ignore +/// use libwayshot::WayshotConnection; +/// /// let wayshot_connection = WayshotConnection::new()?; /// let image_buffer = wayshot_connection.screenshot_all()?; /// ``` diff --git a/libwayshot/src/region.rs b/libwayshot/src/region.rs index 6813ded2..75bf98e8 100644 --- a/libwayshot/src/region.rs +++ b/libwayshot/src/region.rs @@ -30,7 +30,7 @@ pub struct LogicalRegion { /// /// Example: /// -/// ```` +/// ````ignore /// ┌─────────────┐ /// │ │ /// │ ┌──────────┼──────┐ From 37d7307dfa5a8ad4d65076e319eef37733461eca Mon Sep 17 00:00:00 2001 From: id3v1669 Date: Sat, 6 Apr 2024 20:20:33 +0800 Subject: [PATCH 2/3] commit to pass `cargo fmt -- --check` test --- libwayshot/src/lib.rs | 1 - 1 file changed, 1 deletion(-) diff --git a/libwayshot/src/lib.rs b/libwayshot/src/lib.rs index 2dfe80b3..b4f95257 100644 --- a/libwayshot/src/lib.rs +++ b/libwayshot/src/lib.rs @@ -68,7 +68,6 @@ pub mod reexport { /// /// ```ignore /// use libwayshot::WayshotConnection; -/// /// let wayshot_connection = WayshotConnection::new()?; /// let image_buffer = wayshot_connection.screenshot_all()?; /// ``` From dc4052fd6b40cfbbe7f924794d72850213ed43d9 Mon Sep 17 00:00:00 2001 From: id3v1669 Date: Sun, 7 Apr 2024 03:43:35 +0800 Subject: [PATCH 3/3] add `cargo test` to Makefile --- Makefile | 1 + 1 file changed, 1 insertion(+) diff --git a/Makefile b/Makefile index 0290ceae..3a5a35b9 100644 --- a/Makefile +++ b/Makefile @@ -8,6 +8,7 @@ MAN7_DIR := /usr/share/man/man7 all: build build: + @cargo test @cargo build $(BUILDFLAGS) run: