-
-
Save rust-play/68096d7fca2745aa8da852d062090a5d to your computer and use it in GitHub Desktop.
Code shared from the Rust Playground
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
struct S { my_something: String } | |
impl S | |
{ | |
fn get_my_something(self) -> String { self.my_something } | |
} | |
fn main() | |
{ | |
let s = S{ my_something: "サクレ・レモンは最高に美味しい氷菓です🍋".to_string() }; | |
let awesome_message = s.get_my_something(); | |
ptinrln!( "おめでとうございます。あなたは「{}」と暗示を受け始めました。", awesome_message ); | |
let more_message = s.get_my_something(); | |
println!( "だいじな事なのでもう一度お伝えします: 『{}』!!", more_message ); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment