Page MenuHomePhabricator

D4225.id13459.diff
No OneTemporary

D4225.id13459.diff

diff --git a/services/commtest/tests/lib/tools.rs b/services/commtest/tests/lib/tools.rs
new file mode 100644
--- /dev/null
+++ b/services/commtest/tests/lib/tools.rs
@@ -0,0 +1,25 @@
+use bytesize::ByteSize;
+use std::env;
+
+#[allow(dead_code)]
+pub fn generate_nbytes(n: usize, c: Option<u8>) -> Vec<u8> {
+ let c: u8 = match c {
+ Some(c) => c,
+ None => b'A',
+ };
+ return vec![c; n];
+}
+
+#[derive(
+ Debug, derive_more::Display, derive_more::From, derive_more::Error,
+)]
+pub enum Error {
+ #[display(...)]
+ EnvVar(env::VarError),
+ #[display(...)]
+ Proto(std::io::Error),
+ #[display(...)]
+ Tonic(tonic::transport::Error),
+ #[display(...)]
+ TonicStatus(tonic::Status),
+}

File Metadata

Mime Type
text/plain
Expires
Mon, Nov 18, 12:23 PM (21 h, 39 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2534917
Default Alt Text
D4225.id13459.diff (707 B)

Event Timeline