mirror of
https://github.com/hannobraun/Fornjot
synced 2025-05-07 19:38:29 +00:00
Simplify
This commit is contained in:
parent
a9f95d442b
commit
e6b7fa4adc
@ -1,4 +1,4 @@
|
|||||||
use std::{fmt, rc::Rc};
|
use std::fmt;
|
||||||
|
|
||||||
use tuples::CombinRight;
|
use tuples::CombinRight;
|
||||||
|
|
||||||
@ -18,7 +18,7 @@ impl OpsLog {
|
|||||||
|
|
||||||
self.operations.push(OperationInSequence {
|
self.operations.push(OperationInSequence {
|
||||||
operation: AnyOp::new(vertex),
|
operation: AnyOp::new(vertex),
|
||||||
previous: self.operations.last().map(|op| Rc::new(op.clone()) as _),
|
previous: self.operations.last().map(|op| AnyOp::new(op.clone())),
|
||||||
});
|
});
|
||||||
|
|
||||||
OperationResult {
|
OperationResult {
|
||||||
@ -35,7 +35,7 @@ impl OpsLog {
|
|||||||
|
|
||||||
self.operations.push(OperationInSequence {
|
self.operations.push(OperationInSequence {
|
||||||
operation: AnyOp::new(triangle),
|
operation: AnyOp::new(triangle),
|
||||||
previous: self.operations.last().map(|op| Rc::new(op.clone()) as _),
|
previous: self.operations.last().map(|op| AnyOp::new(op.clone())),
|
||||||
});
|
});
|
||||||
|
|
||||||
OperationResult {
|
OperationResult {
|
||||||
@ -79,7 +79,7 @@ impl Operation for OpsLog {
|
|||||||
#[derive(Clone)]
|
#[derive(Clone)]
|
||||||
struct OperationInSequence {
|
struct OperationInSequence {
|
||||||
pub operation: AnyOp,
|
pub operation: AnyOp,
|
||||||
pub previous: Option<Rc<dyn Operation>>,
|
pub previous: Option<AnyOp>,
|
||||||
}
|
}
|
||||||
|
|
||||||
impl Operation for OperationInSequence {
|
impl Operation for OperationInSequence {
|
||||||
|
Loading…
Reference in New Issue
Block a user