In Capital One's Eno chat experience, repeated characters can indicate noisy input. Given a string s, write a function that returns the length of the longest substring that contains no repeated characters.
A substring must be contiguous. Your solution should run efficiently for large inputs.
sdef longest_unique_substring(s):