tor-netdoc: Avoid use of string slices in PortPolicy
This commit removes the use of string slices in PortPolicy::from_str()
by making use of str::split_once instead.
It also adds a test written by @5225225.
See arti#2566
This commit removes the use of string slices in PortPolicy::from_str()
by making use of str::split_once instead.
It also adds a test written by @5225225.
See arti#2566