I'm a beginner and I'd like to understand what I might be doing wrong, especially since I come from Python.
Cyclip
u/Cyclip
I've used Python for 4 years, Rust for 5 months and I've done countless projects. I'm not sure how to answer this question and I don't want to provide an incorrect figure.
edit: I forgot to mention I need it in hours as an estimate
I'm only able to get the code including the function declaration but I just want to separate the code inside the function. My (relevant) code so far is
pub fn test_macro(_metadata: TokenStream, item: TokenStream) -> TokenStream {
let input_fn: Item = syn::parse(item).expect("failed to parse input");
}
But input_fn as a string is just fn test() { println!("test"); }, whereas I want just println!("test");. My overall goal is just to modify the function's inner code but I have no idea how to process input_fn.
I'm trying to make a simple function with 2 statements both of which mutate 2 variables to link them together
impl<'a> Node<'a> {
// Add a child to this node
pub fn add_child(&'a mut self, child: &'a mut Node<'a>) {
self.children.push(child); // Add child to Vec<&'a Node<'a>>
child.parent = Some(self); // Set child's parent to Option<&'a Node<'a>>
}
}
What I understand is that a reference to child is pushed onto self.children at line 4, and there can be any number of references because it is an immutable reference.
Then child is mutably borrowed at line 5 and its `parent
Winnie the Pooh stares at the empty honey bottles around him. He hides it from everyone, but he hates himself. He can't control himself. He eats so much it's obscene, and nobody seems to want to help him. If anything, people sometimes enable him.
He doesn't have true friends, he realises. They wouldn't let him get to this point, lying on the floor, stuffed to bursting, and covered in the sticky fools gold. This is their fault.
An epiphany befalls onto him -- for each honey bottle entirely devoured, awaits a deep sticky void seducing him -- a cum jar of sorts. With no hesitation his legs stumble across the other, his hands gripping onto the goo filled lid; it and his big dick rises.
The br
I'm trying to gain weight and it's kind of hard, BUT IM NOT ANOREXIC. People can be a healthy weight (or overweight) and still be anorexic. Just because a person is skinny does not mean they're anorexic. Yes I'm a twig and you should adopt my diet you flab encapsulated cunt you dont deserve to keep your skin on you you're the reason mute people should exist ignorant idiots cant wait to see your casket get carried by a crane aaaaaaaaaa
that was not directed at any of you guys sorry lel
I have both the url to the video, and a temporary url straight to the audio file. I have ffmpeg and I'm trying to play the audio to a vc, except it doesn't play at all without errors.
voice = self.getVoice(ctx) # Works successfully
source = discord.PCMVolumeTransformer(
discord.FFmpegPCMAudio(url), # url = "https://www.youtube.com/?watch=v.."
)
embed = discord.Embed(
title=f"Playing {playing[0]}",
description=f"Song {data['playing'] + 1}/{len(data['queue'])}",
color=config.uniColour,
)
embed.set_thumbnail(url=thumbnailUrl)
i mean thats kind of generalising an entire gender in a negative way and idk. if they said "men are trash" then ye sexist, but "most" makes it seem like it's from experience or something i dont know, all ik is that most guys ik aren't exactly trash it's just prejudicial
is reddit dying
cant force me to not say it innit
give me some award worthy posts rn noobs

