mirror of
https://github.com/italicsjenga/winit-sonoma-fix.git
synced 2024-12-24 06:11:30 +11:00
Merge pull request #773 from IvanUkhov/title
Generalize WindowBuilder::with_title
This commit is contained in:
commit
547161af27
|
@ -32,7 +32,7 @@ fn main() {
|
|||
};
|
||||
|
||||
let window = glutin::WindowBuilder::new()
|
||||
.with_title("Hello world!".to_string())
|
||||
.with_title("Hello world!")
|
||||
.with_fullscreen(monitor)
|
||||
.build()
|
||||
.unwrap();
|
||||
|
|
|
@ -63,8 +63,8 @@ impl<'a> WindowBuilder<'a> {
|
|||
|
||||
/// Requests a specific title for the window.
|
||||
#[inline]
|
||||
pub fn with_title(mut self, title: String) -> WindowBuilder<'a> {
|
||||
self.window.title = title;
|
||||
pub fn with_title<T: Into<String>>(mut self, title: T) -> WindowBuilder<'a> {
|
||||
self.window.title = title.into();
|
||||
self
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue