fn take_ownership(s: String) {
println!("Took ownership: {}", s);
} // s is dropped here
fn main() {
let message = String::from("hello");
fn calculate_length(s: &String) -> usize {
s.len()
}
fn append_suffix(s: &mut String) {
s.push_str(" world");
<?php
namespace App\Security\Voter;
use App\Entity\Comment;
use Symfony\Component\Security\Core\Authentication\Token\TokenInterface;
#[derive(Debug, Clone)]
pub enum Outcome {
Approve,
Review,
Reject(String),
}