unicode/bidi: panic rather than log.Panicf

Not much of a change in binary size, but there's no reason for
this package to pull in the log package.

For #38311

Change-Id: I9adc4b2b6cfadd05a2fe7a1119faac6e6a6a6964
Reviewed-on: https://go-review.googlesource.com/c/text/+/818803
Reviewed-by: David Chase <drchase@google.com>
Auto-Submit: Damien Neil <dneil@google.com>
LUCI-TryBot-Result: golang-scoped@luci-project-accounts.iam.gserviceaccount.com <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Russ Cox <rsc@golang.org>
diff --git a/unicode/bidi/core.go b/unicode/bidi/core.go
index fb82732..e28ac8c 100644
--- a/unicode/bidi/core.go
+++ b/unicode/bidi/core.go
@@ -6,7 +6,6 @@
 
 import (
 	"fmt"
-	"log"
 )
 
 // This implementation is a port based on the reference implementation found at:
@@ -248,7 +247,7 @@
 		} else if t.in(FSI, LRI, RLI) {
 			i = p.matchingPDI[i] // skip over to the matching PDI
 			if i > end {
-				log.Panic("assert (i <= end)")
+				panic("assert (i <= end)")
 			}
 		}
 	}
@@ -729,7 +728,7 @@
 				continue loop
 			}
 		}
-		log.Panicf("invalid bidi code %v present in assertOnly at position %d", t, s.indexes[i])
+		panic(fmt.Errorf("invalid bidi code %v present in assertOnly at position %d", t, s.indexes[i]))
 	}
 }