about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/lib.rs32
1 files changed, 14 insertions, 18 deletions
diff --git a/src/lib.rs b/src/lib.rs
index 42bc748..8fdda89 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -158,22 +158,18 @@ struct VersionInfo {
 #[gnauth(disabled)]
 async fn version(ctx: Ctx) -> Json<Envelope<VersionInfo>> {
     let git = env!("GN4_GIT_HASH");
-    Json(
-        ctx.envelope(VersionInfo {
-            name: "GeneNetwork4",
-            short_name: "GN4AI",
-            version: 4.0,
-            release: 1,
-            date: env!("GN4_COMMIT_DATE"),
-            git,
-            dirty: git.ends_with("-dirty"),
-            source_digest: env!("GN4_SOURCE_DIGEST"),
-            branch: env!("GN4_GIT_BRANCH"),
-        })
-        .with_note(
-            "`git` is stamped when this binary was built; `-dirty` means the build had \
-             uncommitted changes, and `source_digest` identifies the compiled sources even then. \
-             A stamp is never advanced by committing without rebuilding.",
-        ),
-    )
+    // No `notes` here: the fields say what they are (see VersionInfo's
+    // doc comments), and /version is the cheapest endpoint for the
+    // envelope test's "notes is an empty array" case.
+    Json(ctx.envelope(VersionInfo {
+        name: "GeneNetwork4",
+        short_name: "GN4AI",
+        version: 4.0,
+        release: 1,
+        date: env!("GN4_COMMIT_DATE"),
+        git,
+        dirty: git.ends_with("-dirty"),
+        source_digest: env!("GN4_SOURCE_DIGEST"),
+        branch: env!("GN4_GIT_BRANCH"),
+    }))
 }