Skip to content

Commit

Permalink
Fixed bad use
Browse files Browse the repository at this point in the history
  • Loading branch information
agg23 committed Jul 21, 2023
1 parent cf2f07c commit 9f727ea
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 6 deletions.
4 changes: 1 addition & 3 deletions src/input/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ use objc_id::ShareId;

use crate::color::Color;
use crate::control::Control;
use crate::foundation::{id, nil, NSArray, NSInteger, NSString, NO, YES};
use crate::foundation::{id, nil, NSArray, NSInteger, NSString, Retainable, NO, YES};
use crate::layout::Layout;
use crate::objc_access::ObjcAccess;
use crate::text::{Font, TextAlign};
Expand Down Expand Up @@ -294,8 +294,6 @@ impl<T> TextField<T> {
/// Grabs the value from the textfield and returns it as an owned String.
#[cfg(feature = "appkit")]
pub fn get_value(&self) -> String {
use crate::foundation::Retainable;

self.objc
.get(|obj| unsafe { NSString::retain(msg_send![obj, stringValue]).to_string() })
}
Expand Down
4 changes: 1 addition & 3 deletions src/text/label/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ use objc::{msg_send, sel, sel_impl};
use objc_id::ShareId;

use crate::color::Color;
use crate::foundation::{id, nil, NSArray, NSInteger, NSString, NSUInteger, NO, YES};
use crate::foundation::{id, nil, NSArray, NSInteger, NSString, NSUInteger, Retainable, NO, YES};
use crate::layer::Layer;
use crate::layout::Layout;
use crate::objc_access::ObjcAccess;
Expand Down Expand Up @@ -365,8 +365,6 @@ impl<T> Label<T> {
/// Retrieve the text currently held in the label.
#[cfg(feature = "appkit")]
pub fn get_text(&self) -> String {
use crate::foundation::Retainable;

self.objc
.get(|obj| unsafe { NSString::retain(msg_send![obj, stringValue]).to_string() })
}
Expand Down

0 comments on commit 9f727ea

Please sign in to comment.