Chih-Hung Hsieh | 92ff605 | 2020-06-10 20:18:39 -0700 | [diff] [blame^] | 1 | use Customize; |
2 | |||||
3 | /// Path to `protobuf` crate, different when `.proto` file is | ||||
4 | /// used inside or outside of protobuf crate. | ||||
5 | pub(crate) fn protobuf_crate_path(customize: &Customize) -> &str { | ||||
6 | match customize.inside_protobuf { | ||||
7 | // Can't use `crate::` paths before Rust 1.32.0 | ||||
8 | //Some(true) => "crate", | ||||
9 | _ => "::protobuf", | ||||
10 | } | ||||
11 | } |