Skip to content

Commit 7cfe8c1

Browse files
committed
feat(xcodeproj): deref as pbxproj
1 parent 8c045ae commit 7cfe8c1

File tree

2 files changed

+4
-32
lines changed

2 files changed

+4
-32
lines changed

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "xcodeproj"
3-
version = "0.2.4"
3+
version = "0.2.5"
44
edition = "2021"
55
description = "xcodeproj reader and parser."
66
license = "MIT OR Apache-2.0"

src/lib.rs

Lines changed: 3 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -6,16 +6,18 @@
66
#![doc = include_str!("../README.md")]
77

88
use anyhow::Result;
9-
use pbxproj::{PBXFSReference, PBXObjectCollection, PBXProject, PBXRootObject};
9+
use pbxproj::PBXRootObject;
1010
use std::path::{Path, PathBuf};
1111

1212
mod macros;
1313
pub mod pbxproj;
1414
pub mod xcode;
1515

1616
/// Main presentation of XCodeProject
17+
#[derive(Debug, derive_deref_rs::Deref)]
1718
pub struct XCodeProject {
1819
root: PathBuf,
20+
#[deref]
1921
pbxproj: PBXRootObject,
2022
}
2123

@@ -30,34 +32,4 @@ impl XCodeProject {
3032
pbxproj: pbxproj_path.try_into()?,
3133
})
3234
}
33-
34-
/// Get archive version
35-
pub fn archive_version(&self) -> u8 {
36-
self.pbxproj.archive_version()
37-
}
38-
39-
/// Get pbxproj object version
40-
pub fn object_version(&self) -> u8 {
41-
self.pbxproj.object_version()
42-
}
43-
44-
/// Get root project of pbxproj
45-
pub fn root_project(&self) -> PBXProject {
46-
self.pbxproj.root_project()
47-
}
48-
49-
/// Get root group of pbxproj
50-
pub fn root_group(&self) -> PBXFSReference {
51-
self.pbxproj.root_group()
52-
}
53-
54-
/// Get pbxproj objects
55-
pub fn objects(&self) -> &PBXObjectCollection {
56-
self.pbxproj.objects()
57-
}
58-
59-
/// Get mutable reference of pbxproj objects
60-
pub fn objects_mut(&mut self) -> &mut PBXObjectCollection {
61-
self.pbxproj.objects_mut()
62-
}
6335
}

0 commit comments

Comments
 (0)