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 { | ||||
Haibo Huang | ba676d3 | 2020-08-12 13:52:13 -0700 | [diff] [blame] | 7 | Some(true) => "crate", |
Chih-Hung Hsieh | 92ff605 | 2020-06-10 20:18:39 -0700 | [diff] [blame] | 8 | _ => "::protobuf", |
9 | } | ||||
10 | } |