mirror of
https://github.com/YGGverse/Yoda.git
synced 2026-04-01 00:55:28 +00:00
replace clone with copy
This commit is contained in:
parent
164cddac5a
commit
07ee9cba07
2 changed files with 4 additions and 4 deletions
|
|
@ -95,7 +95,7 @@ impl Meta {
|
|||
}
|
||||
|
||||
pub fn redirect_count(&self) -> Option<i8> {
|
||||
self.redirect_count.borrow().clone()
|
||||
*self.redirect_count.borrow()
|
||||
}
|
||||
|
||||
/// WARNING!
|
||||
|
|
|
|||
|
|
@ -73,7 +73,7 @@ impl History {
|
|||
}
|
||||
|
||||
pub fn back(&self, follow_to_index: bool) -> Option<GString> {
|
||||
let index = self.index.borrow().clone(); // keep outside as borrow
|
||||
let index = *self.index.borrow();
|
||||
if let Some(usize) = index {
|
||||
// Make sure value positive to prevent panic
|
||||
if usize > 0 {
|
||||
|
|
@ -89,7 +89,7 @@ impl History {
|
|||
}
|
||||
|
||||
pub fn current(&self) -> Option<GString> {
|
||||
let index = self.index.borrow().clone(); // keep outside as borrow
|
||||
let index = *self.index.borrow();
|
||||
if let Some(usize) = index {
|
||||
if let Some(memory) = self.memory.borrow().get(usize) {
|
||||
return Some(memory.request.clone());
|
||||
|
|
@ -99,7 +99,7 @@ impl History {
|
|||
}
|
||||
|
||||
pub fn forward(&self, follow_to_index: bool) -> Option<GString> {
|
||||
let index = self.index.borrow().clone(); // keep outside as borrow
|
||||
let index = *self.index.borrow();
|
||||
if let Some(usize) = index {
|
||||
if let Some(memory) = self.memory.borrow().get(usize + 1) {
|
||||
if follow_to_index {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue