Skip to main content

max / makenotwork

Release mnw-server v0.16.1 Move main.rs's inspection tests to the end of the file: clippy's items_after_test_module fired on the items following them, and Sando's clippy gate denies warnings.
Co-Authored-By
Claude Opus 5 (1M context) <noreply@anthropic.com>
Author: Max Johnson <me@maxj.phd> · 2026-08-24 20:05 UTC
Signed with PGP, not checked
Commit: eda47223450af15b6f2497766e29e4ed8fae9689
Parent: 4adef9c
4 files changed, +51 insertions, -51 deletions
M server/Cargo.lock +13 -13
@@ -5260,7 +5260,7 @@
5260 5260
5261 5261 [[package]]
5262 5262 name = "makenotwork"
5263 - version = "0.16.0"
5263 + version = "0.16.1"
5264 5264 dependencies = [
5265 5265 "ammonia",
5266 5266 "anyhow",
@@ -10741,12 +10741,16 @@
10741 10741 ]
10742 10742
10743 10743 [[patch.unused]]
10744 - name = "synckit-client"
10745 - version = "0.8.1"
10744 + name = "kberg"
10745 + version = "0.1.0"
10746 10746
10747 10747 [[patch.unused]]
10748 - name = "synckit-config"
10749 - version = "0.2.0"
10748 + name = "ops-status"
10749 + version = "0.1.0"
10750 +
10751 + [[patch.unused]]
10752 + name = "painhours"
10753 + version = "0.1.0"
10750 10754
10751 10755 [[patch.unused]]
10752 10756 name = "quasi-immediate"
@@ -10765,13 +10769,9 @@
10765 10769 version = "0.56.0"
10766 10770
10767 10771 [[patch.unused]]
10768 - name = "kberg"
10769 - version = "0.1.0"
10772 + name = "synckit-client"
10773 + version = "0.9.0"
10770 10774
10771 10775 [[patch.unused]]
10772 - name = "ops-status"
10773 - version = "0.1.0"
10774 -
10775 - [[patch.unused]]
10776 - name = "painhours"
10777 - version = "0.1.0"
10776 + name = "synckit-config"
10777 + version = "0.2.0"
@@ -1,6 +1,6 @@
1 1 [package]
2 2 name = "makenotwork"
3 - version = "0.16.0"
3 + version = "0.16.1"
4 4 edition = "2024"
5 5 license = "LicenseRef-PolyForm-Noncommercial-1.0.0"
6 6 # Server binary: never published to a registry. Marks the crate private so
@@ -6,7 +6,7 @@
6 6 "license": {
7 7 "name": "PolyForm Noncommercial 1.0.0"
8 8 },
9 - "version": "0.16.0"
9 + "version": "0.16.1"
10 10 },
11 11 "paths": {
12 12 "/api/git/{owner}/{repo}/notes": {
M server/src/main.rs +36 -36
@@ -878,42 +878,6 @@
878 878 Some(0)
879 879 }
880 880
881 - #[cfg(test)]
882 - mod inspection_tests {
883 - use super::*;
884 -
885 - #[test]
886 - fn version_flags_are_recognised() {
887 - assert_eq!(inspection_request(["--version"]), Some(Inspection::Version));
888 - assert_eq!(inspection_request(["-V"]), Some(Inspection::Version));
889 - }
890 -
891 - #[test]
892 - fn help_flags_are_recognised() {
893 - assert_eq!(inspection_request(["--help"]), Some(Inspection::Help));
894 - assert_eq!(inspection_request(["-h"]), Some(Inspection::Help));
895 - }
896 -
897 - #[test]
898 - fn boot_arguments_are_not_inspection_requests() {
899 - assert_eq!(inspection_request(Vec::<String>::new()), None);
900 - assert_eq!(inspection_request(["--seed-examples"]), None);
901 - }
902 -
903 - #[test]
904 - fn the_first_inspection_flag_wins() {
905 - assert_eq!(
906 - inspection_request(["--seed-examples", "--version", "--help"]),
907 - Some(Inspection::Version)
908 - );
909 - }
910 -
911 - #[test]
912 - fn version_line_carries_the_crate_version() {
913 - assert!(version_line().starts_with(&format!("makenotwork {}", env!("CARGO_PKG_VERSION"))));
914 - }
915 - }
916 -
917 881 /// Wait for SIGINT (Ctrl-C) or SIGTERM, then return to trigger graceful shutdown.
918 882 /// In-flight requests get up to `SHUTDOWN_REQUEST_DRAIN_SECS` to complete, then
919 883 /// the post-serve drains get `SHUTDOWN_POOL_DRAIN_SECS`; the hard-exit timer
@@ -952,3 +916,39 @@
952 916 std::process::exit(1);
953 917 });
954 918 }
919 +
920 + #[cfg(test)]
921 + mod inspection_tests {
922 + use super::*;
923 +
924 + #[test]
925 + fn version_flags_are_recognised() {
926 + assert_eq!(inspection_request(["--version"]), Some(Inspection::Version));
927 + assert_eq!(inspection_request(["-V"]), Some(Inspection::Version));
928 + }
929 +
930 + #[test]
931 + fn help_flags_are_recognised() {
932 + assert_eq!(inspection_request(["--help"]), Some(Inspection::Help));
933 + assert_eq!(inspection_request(["-h"]), Some(Inspection::Help));
934 + }
935 +
936 + #[test]
937 + fn boot_arguments_are_not_inspection_requests() {
938 + assert_eq!(inspection_request(Vec::<String>::new()), None);
939 + assert_eq!(inspection_request(["--seed-examples"]), None);
940 + }
941 +
942 + #[test]
943 + fn the_first_inspection_flag_wins() {
944 + assert_eq!(
945 + inspection_request(["--seed-examples", "--version", "--help"]),
946 + Some(Inspection::Version)
947 + );
948 + }
949 +
950 + #[test]
951 + fn version_line_carries_the_crate_version() {
952 + assert!(version_line().starts_with(&format!("makenotwork {}", env!("CARGO_PKG_VERSION"))));
953 + }
954 + }