Can't find generic function

Hi, I called a generic function generic_fun from another function build. But the compiler said it cannot find the function. Any suggestion? Thanks!

pub struct Triangle<T> {
    side: T,

impl<T> Triangle<T> {
    pub fn generic_fun(side: T) -> bool {
    pub fn build(side: T) -> Option<Self> {
        if generic_fun(side) {

fn main() {}
error[E0425]: cannot find function `generic_fun` in this scope
  --> src\
10 |         if generic_fun(side) {
   |            ^^^^^^^^^^^ not found in this scope

generic_fun is an associated method of Triangle. You need to call it like so:

if Triangle::generic_fun(side) {

Thank you! I forgot generic function must be static.

This topic was automatically closed 90 days after the last reply. We invite you to open a new topic if you have further questions or comments.