@@ -43,7 +43,7 @@ pub enum TlogError {
4343 #[ error( "indexes out of order" ) ]
4444 IndexesOutOfOrder ,
4545 #[ error( "unmet input condition: {0}" ) ]
46- InvalidInput ( String ) ,
46+ ConditionNotMet ( String ) ,
4747 #[ error( "missing verifier signature" ) ]
4848 MissingVerifierSignature ,
4949 #[ error( "timestamp is after current time" ) ]
@@ -767,7 +767,7 @@ impl Subtree {
767767 /// Will return an error if `[lo, hi)` is not a valid subtree.
768768 pub fn new ( lo : u64 , hi : u64 ) -> Result < Self , TlogError > {
769769 if lo >= hi {
770- return Err ( TlogError :: InvalidInput ( "`lo < hi`" . into ( ) ) ) ;
770+ return Err ( TlogError :: ConditionNotMet ( "`lo < hi`" . into ( ) ) ) ;
771771 }
772772 // `s` is the smallest power of 2 that is greater than or equal
773773 // to `lo - hi`.
@@ -782,7 +782,7 @@ impl Subtree {
782782 }
783783 } ;
784784 if lo & ( s - 1 ) != 0 {
785- return Err ( TlogError :: InvalidInput (
785+ return Err ( TlogError :: ConditionNotMet (
786786 "`lo` must be a multiple of the smallest power of two ≥ `hi - lo`" . into ( ) ,
787787 ) ) ;
788788 }
@@ -825,7 +825,7 @@ impl Subtree {
825825 /// Will return an error if `lo ≤ hi`.
826826 pub fn split_interval ( lo : u64 , hi : u64 ) -> Result < ( Self , Option < Self > ) , TlogError > {
827827 if lo >= hi {
828- return Err ( TlogError :: InvalidInput ( "`lo < hi`" . into ( ) ) ) ;
828+ return Err ( TlogError :: ConditionNotMet ( "`lo < hi`" . into ( ) ) ) ;
829829 }
830830 if hi - lo == 1 {
831831 return Ok ( ( Self { lo, hi } , None ) ) ;
@@ -954,7 +954,7 @@ impl Subtree {
954954 F : FnMut ( & Subtree ) -> Vec < T > ,
955955 {
956956 if !self . contains_subtree ( m) {
957- return Err ( TlogError :: InvalidInput ( format ! (
957+ return Err ( TlogError :: ConditionNotMet ( format ! (
958958 "{self} does not contain {m}"
959959 ) ) ) ;
960960 }
0 commit comments