Skip to content

Commit 9f26766

Browse files
committed
Move generated types to types mod within vss-client
1 parent b78cd79 commit 9f26766

File tree

7 files changed

+259
-263
lines changed

7 files changed

+259
-263
lines changed

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
/target
2-
/vss-accessor/src/proto/
2+
/src/proto/

build.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,8 @@ fn generate_protos() {
1919
).unwrap();
2020

2121
prost_build::compile_protos(&["src/proto/vss.proto"], &["src/"]).unwrap();
22-
let from_path = Path::new(&env::var("OUT_DIR").unwrap()).join("org.vss.rs");
23-
fs::copy(from_path, "src/generated-src/org.vss.rs").unwrap();
22+
let from_path = Path::new(&env::var("OUT_DIR").unwrap()).join("vss.rs");
23+
fs::copy(from_path, "src/types.rs").unwrap();
2424
}
2525

2626
#[cfg(feature = "genproto")]

src/client.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ use reqwest;
55
use reqwest::Client;
66

77
use crate::error::VssError;
8-
use crate::vss::{
8+
use crate::types::{
99
GetObjectRequest, GetObjectResponse, ListKeyVersionsRequest, ListKeyVersionsResponse, PutObjectRequest,
1010
PutObjectResponse,
1111
};

src/error.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
use crate::vss::{ErrorCode, ErrorResponse};
1+
use crate::types::{ErrorCode, ErrorResponse};
22
use prost::bytes::Bytes;
33
use prost::{DecodeError, Message};
44
use reqwest::StatusCode;

src/generated-src/org.vss.rs

Lines changed: 0 additions & 251 deletions
This file was deleted.

src/lib.rs

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,6 @@
11
#![deny(rustdoc::broken_intra_doc_links)]
22
#![deny(rustdoc::private_intra_doc_links)]
33

4-
mod client;
5-
mod error;
6-
7-
/// Import auto-generated objects from protobuf specification of VSS
8-
pub mod vss {
9-
include!("generated-src/org.vss.rs");
10-
}
4+
pub mod client;
5+
pub mod error;
6+
pub mod types;

0 commit comments

Comments
 (0)