aboutsummaryrefslogtreecommitdiffhomepage
path: root/crates/shirabe/src/installer/package_event.rs
diff options
context:
space:
mode:
Diffstat (limited to 'crates/shirabe/src/installer/package_event.rs')
-rw-r--r--crates/shirabe/src/installer/package_event.rs16
1 files changed, 8 insertions, 8 deletions
diff --git a/crates/shirabe/src/installer/package_event.rs b/crates/shirabe/src/installer/package_event.rs
index 6661e0d1..28a8a2ea 100644
--- a/crates/shirabe/src/installer/package_event.rs
+++ b/crates/shirabe/src/installer/package_event.rs
@@ -1,7 +1,7 @@
//! ref: composer/src/Composer/Installer/PackageEvent.php
use crate::composer::ComposerWeakHandle;
-use crate::dependency_resolver::operation::OperationInterface;
+use crate::dependency_resolver::operation::AnyOperation;
use crate::event_dispatcher::Event;
use crate::event_dispatcher::EventInterface;
use crate::io::IOInterface;
@@ -16,8 +16,8 @@ pub struct PackageEvent {
io: std::rc::Rc<std::cell::RefCell<dyn IOInterface>>,
dev_mode: bool,
local_repo: Box<dyn RepositoryInterface>,
- operations: Vec<std::rc::Rc<dyn OperationInterface>>,
- operation: std::rc::Rc<dyn OperationInterface>,
+ operations: Vec<AnyOperation>,
+ operation: AnyOperation,
}
impl PackageEvent {
@@ -27,8 +27,8 @@ impl PackageEvent {
io: std::rc::Rc<std::cell::RefCell<dyn IOInterface>>,
dev_mode: bool,
local_repo: Box<dyn RepositoryInterface>,
- operations: Vec<std::rc::Rc<dyn OperationInterface>>,
- operation: std::rc::Rc<dyn OperationInterface>,
+ operations: Vec<AnyOperation>,
+ operation: AnyOperation,
) -> Self {
Self {
inner: Event::new(event_name, vec![], IndexMap::new()),
@@ -61,12 +61,12 @@ impl PackageEvent {
self.local_repo.as_ref()
}
- pub fn get_operations(&self) -> &Vec<std::rc::Rc<dyn OperationInterface>> {
+ pub fn get_operations(&self) -> &Vec<AnyOperation> {
&self.operations
}
- pub fn get_operation(&self) -> &dyn OperationInterface {
- self.operation.as_ref()
+ pub fn get_operation(&self) -> &AnyOperation {
+ &self.operation
}
}