protobuf_codegen/gen/inside.rs
1use crate::customize::Customize;
2use crate::gen::rust::path::RustPath;
3
4/// Path to `protobuf` crate, different when `.proto` file is
5/// used inside or outside of protobuf crate.
6pub(crate) fn protobuf_crate_path(customize: &Customize) -> RustPath {
7 match customize.inside_protobuf {
8 Some(true) => RustPath::from("crate"),
9 _ => RustPath::from("::protobuf"),
10 }
11}