dist: Add Deref<Target=str> for TargetTriple
use std::env;
use std::fmt;
+use std::ops::Deref;
use std::path::Path;
use std::str::FromStr;
@@ -178,6 +179,13 @@ impl FromStr for ParsedToolchainDesc {
}
}
+impl Deref for TargetTriple {
+ type Target = str;
+ fn deref(&self) -> &Self::Target {
+ &self.0
+ }
+}
+
impl TargetTriple {
pub fn new(name: &str) -> Self {
Self(name.to_string())
