Result has no method called “unwrap()”?

If you read the documentation for Result::unwrap, you’ll note that it’s under a little section called:

impl<T, E> Result<T, E> 
    where E: Debug

This means the methods in that section only exist so long as the given constraints are satisfied.

The only reason unwrap wouldn’t exist is that Error doesn’t implement Debug.

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)