pub fn is_retina<P: AsRef<Path>>(path: P) -> bool {
  path
    .as_ref()
    .file_stem()
    .and_then(OsStr::to_str)
    .map(|stem| stem.ends_with("@2x"))
    .unwrap_or(false)
}
/// Returns true if the path has a filename indicating that it is a high-desity
/// "retina" icon.  Specifically, returns true the the file stem ends with
/// "@2x" (a convention specified by the [Apple developer docs](
/// https://developer.apple.com/library/mac/documentation/GraphicsAnimation/Conceptual/HighResolutionOSX/Optimizing/Optimizing.html)).
Returns true if the path has a filename indicating that it is a high-desity
"retina" icon.
Returns true if the path has a filename indicating that it is a high - desity " retina " icon .
pub fn is_retina<P: AsRef<Path>>(path: P) -> bool {
  path
    .as_ref()
    .file_stem()
    .and_then(OsStr::to_str)
    .map(|stem| stem.ends_with("@2x"))
    .unwrap_or(false)
}
pub fn is_retina < P : AsRef < Path > > ( path : P ) -> bool { path . as_ref ( ) . file_stem ( ) . and_then ( OsStr :: to_str ) . map ( | stem | stem . ends_with ( " " ) ) . unwrap_or ( false ) }
Returns true if the path has a filename indicating that it is a high-desity
"retina" icon.
Returns true if the path has a filename indicating that it is a high - desity " retina " icon .
path
P
path
P