Mark version specific API logic with compiler feature attributes
This commit is contained in:
parent
4cfc9b16b6
commit
2236801f64
2 changed files with 4 additions and 1 deletions
|
@ -49,7 +49,7 @@ impl<'a> Upload<'a> {
|
|||
let matcher_upload = UploadMatcher::with(self.cmd_matches).unwrap();
|
||||
|
||||
// Get API parameters
|
||||
let mut path = Path::new(matcher_upload.file()).to_path_buf();
|
||||
let path = Path::new(matcher_upload.file()).to_path_buf();
|
||||
let host = matcher_upload.host();
|
||||
|
||||
// Create a reqwest client capable for uploading files
|
||||
|
|
|
@ -11,4 +11,7 @@ pub const CLIENT_TRANSFER_TIMEOUT: u64 = 24 * 60 * 60;
|
|||
pub const API_VERSION_DESIRED_DEFAULT: DesiredVersion = DesiredVersion::Assume(API_VERSION_ASSUME);
|
||||
|
||||
/// The default server API version to assume when it could not be determined.
|
||||
#[cfg(feature = "send2")]
|
||||
pub const API_VERSION_ASSUME: Version = Version::V2;
|
||||
#[cfg(not(feature = "send2"))]
|
||||
pub const API_VERSION_ASSUME: Version = Version::V3;
|
||||
|
|
Loading…
Add table
Reference in a new issue