Replace NO_VERSION_ID with NIL_VERSION_ID

The docs refer to this as the "nil version ID" so let's do the same.

This started out more ambitiously, to change this to `VersionId::NIL`,
but that required making VersionId a newtype and all of the implicit
conversions from VersionId to Uuid would have to be explicit.  That
didn't seem wortht the trouble.
This commit is contained in:
Dustin J. Mitchell
2021-10-09 17:59:09 -04:00
parent f109056340
commit 536b88c8f4
4 changed files with 23 additions and 23 deletions

View File

@@ -47,7 +47,7 @@ pub(crate) async fn service(
#[cfg(test)]
mod test {
use crate::server::NO_VERSION_ID;
use crate::server::NIL_VERSION_ID;
use crate::storage::{InMemoryStorage, Storage};
use crate::Server;
use actix_web::{http::StatusCode, test, App};
@@ -144,7 +144,7 @@ mod test {
// but the child of the nil parent_version_id is NOT FOUND, since
// there is no snapshot. The tests in crate::server test more
// corner cases.
let uri = format!("/v1/client/get-child-version/{}", NO_VERSION_ID);
let uri = format!("/v1/client/get-child-version/{}", NIL_VERSION_ID);
let req = test::TestRequest::get()
.uri(&uri)
.header("X-Client-Key", client_key.to_string())